Mobile Application
Titanium SDK: Titanium SDK version: 2.0.2 (05/30/12 10:21 2ff31a3)
Platform: iOS 5.1, Android 4.1 - Galaxy Nexus
Host OS: Mac OSX 10.8 Mountain Lion
Titanium Studio Version: Titanium Studio, build: 2.1.0.201206251749
I am trying to make my labels ellipsize on Android, it currently works on iOS but on android It does not, I have tried changing the ellipsize property in the label being used as well as trying label.ellipsize = true and label.setEllipsize(true) but still with no luck on Android
The label is put into a TableViewRow, I have set ellipsize true for this as well as the tableView and Window but still it does not seem to work
here is the code for my label any help would be much appreciated
var statusLabel = Ti.UI.createLabel({ font:{fontSize:'13 dp'}, wordwrap:false, ellipsize: true, left:'90 dp', top:'10 dp', right:'20 dp', height:'78 dp', color:'#222', verticalAlign: 'top', layout:'vertical', text:(!row.message ? 'No status message' : row.message) });
1 Answer
one possible thought is your dimensions might be being calculated weirdly? i have never seen a space before between the number and the 'dp' string. so use '90dp' rather then '90 dp'. This might do nothing as well.
verticalAlign is also only a mobileweb only property, does nothing in Android (or is undocumented/has weird results). Try removing that as well.
Your Answer
Think you can help? Login to answer this question!