[TIMOB-12996] Android: Unexpected layout when adding images and labels to TableViewRow
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-08-22T23:49:21.000+0000 |
Affected Version/s | Release 3.0.2, Release 3.1.0 |
Fix Version/s | Release 6.2.0 |
Components | Android |
Labels | n/a |
Reporter | Jamie Buckley |
Assignee | Joshua Quick |
Created | 2013-03-07T23:07:28.000+0000 |
Updated | 2017-08-22T23:50:57.000+0000 |
Description
When adding an imageview and labels to a tableview row with horizontal layout will push the label down to the next line instead of wrapping the text, on iOS it will correctly wrap the text.
Images attached
Example code:
var win = Ti.UI.createWindow({
backgroundColor: 'white'
})
var row1 = Ti.UI.createTableViewRow({
layout: 'horizontal'
})
var image1 = Ti.UI.createImageView({
image: 'appicon.png',
height: '50',
width: '50'
});
row1.add(image1);
var label1 = Ti.UI.createLabel({
text: 'Long text is long. Long text is long. Long text is long. Long text is long. Long text is long.',
color: 'black'
});
row1.add(label1);
var label2 = Ti.UI.createLabel({
text: 'Long text is long. Long text is long. Long text is long. Long text is long. Long text is long.',
color: 'gray'
})
row1.add(label2);
var tvRow = [];
tvRow.push(row1);
var tableView1 = Ti.UI.createTableView({
top:0, bottom:0, left:0, right:0,
separatorColor:'black',
backgroundColor: 'white',
data: tvRow,
});
win.add(tableView1);
win.open();
Attachments
File | Date | Size |
---|---|---|
Screenshot_3_7_13_2_51_PM-3.png | 2013-03-07T23:07:28.000+0000 | 239851 |
Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 Android Emulator: Android SDK version: 2.2
Passed FR. PR merged. Changes are seen in SDK versions: 6.2.0.v20170822113609 7.0.0.v20170822142802