[AC-2015] Android: Label ellipsize not working when breaking line with
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-05-30T17:58:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | Android, bug, label |
Reporter | André Perazzi |
Assignee | Mostafizur Rahman |
Created | 2013-05-30T14:47:09.000+0000 |
Updated | 2016-03-08T07:40:57.000+0000 |
Description
When the label's property ellipsize is set true, if the text has a line break '\n', the property doesn't work.
Steps to reproduce:
1 - Create a label with a fixed width and height and ellipsize set true.
2 - Put a long text in it.
IF there is no \n in the text, the label will get ellipsized with "..." .
IF there is a \n in the text, it won't.
Ti.UI.createLabel({
textAlign:'left',
width:'auto',
height:'19dp',
ellipsize:true,
top:'45dp',
color:'black',
text: 'sfashdfgaskdfhaslkdfjhaslkjdfhaslkjdfhlaskjhfdlk \n sajhdflksajhflkdjhfalskjdfhalskjhdflksajhfdlkashjdlkfdjh',
font:{fontSize:'12dp',fontWeight:'normal',fontFamily:'Arial'}
});
Andre, I could not reproduce the issue you are seeing. I created my own test case which I pasted below. This is the proper way to use ellipsize. Would you mind trying it and letting me know if your problem persists? Also please provide the android version you are testing the code on.
Regards, Carter