[TIMOB-24545] Android: ellipsize not working with no width
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2017-03-29T17:29:20.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | n/a |
Components | Android |
Labels | android, ellipsize, ipass1, label |
Reporter | Kouroche Sedaghatian |
Assignee | Lokesh Choudhary |
Created | 2017-03-29T17:28:33.000+0000 |
Updated | 2017-03-29T17:29:20.000+0000 |
Description
On Android, ellipsize will work for single line labels, only if the width property is defined and wordWrap is set to false. However, if the width of the label is defined in terms of left and right properties, ellipsize does not work.
Ellipsize will work for the label below:
var win = Ti.UI.createWindow({
backgroundColor : "#FFF"
});
var label = Ti.UI.createLabel({
font : {
fontSize : '32dp'
},
width : '250dp',
height : '75dp',
ellipsize : true,
wordWrap : false,
html : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
});
win.add(label);
win.open();
Ellipsize will *not* work for the label below:
var win = Ti.UI.createWindow({
backgroundColor : "#FFF"
});
var label = Ti.UI.createLabel({
font : {
fontSize : '32dp'
},
left : '10dp',
right : '10dip',
height : '75dp',
ellipsize : true,
wordWrap : false,
html : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
});
win.add(label);
win.open();
Created by mistake