Description
When adding a label to a tableviewrow the label does not get sized correctly for the text
var _window = Ti.UI.createWindow();
var row1 = Ti.UI.createTableViewRow({
// height:'auto',
height: Ti.UI.SIZE
});
var label1 = Ti.UI.createLabel({
// height:'auto',
top: 0,
height: Ti.UI.SIZE,
text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
});
row1.add(label1);
var row2 = Ti.UI.createTableViewRow({
// height:'auto',
height: Ti.UI.SIZE
});
var label2 = Ti.UI.createLabel({
// height:'auto',
height: Ti.UI.SIZE,
top: 0,
text: '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.'
});
row2.add(label2);
var table = Ti.UI.createTableView({
index: [{
index: 0,
title: 'a'
}, {
index: 1,
title: 'b'
}],
data: [row1, row2]
});
_window.add(table);
_window.open();
Steps to reproduce
Add the code above to an existing app.js and build for Windows
Observe
Actual result
Label is not correctly sized
Expected result
Label should be correctly sized
[~eharris] Could you help to make the issue clearer? What do you mean by "correctly sized" in particular? I see the issue is that right-edge of the Label is cut off and character is not displayed partially, but I would like to make sure what needs to be fixed in particular for this ticket, just in case. Thanks!
[~kota] Yeah this ticket is awful.. sorry about that :). Yeah the issue was for the sizing of the label and the text being cut off, I'm attaching screenshots of Windows and iOS as a reference for the future
https://github.com/appcelerator/titanium_mobile_windows/pull/942
Verified fixed with the test case provided, text is no longer cut off and characters are displayed correctly. 6.0.0.GA: !6.0.0.GA.png|thumbnail! 6.1.0.v20170209111025: !6.1.0.v20170209111025.png|thumbnail! *Environment *