[TIMOB-24423] Windows Phone: TableViewRow and Label layout not respected
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-03-05T15:14:22.000+0000 |
Affected Version/s | Release 7.5.0 |
Fix Version/s | Release 8.1.0 |
Components | Windows |
Labels | label, layout, table, windows |
Reporter | Sandro Lain |
Assignee | Kota Iguchi |
Created | 2017-02-22T11:11:32.000+0000 |
Updated | 2019-03-05T15:14:23.000+0000 |
Description
Label View and Table Row View do not respect the layout and horizontal positions required.
Table View Row seems to have a margin on the left and the right sides.
The width to 100% of the Label within the Rows seems to be greater than the total width of the screen.
*Test Code*
{noformat}
var win = Ti.UI.createWindow();
var tableView = Ti.UI.createTableView({
width: '100%',
left: 0,
backgroundColor: 'transparent',
separatorStyle: Ti.UI.TABLE_VIEW_SEPARATOR_STYLE_NONE,
data: [],
borderWidth: 1, borderColor: '#FFF',
});
win.add(tableView);
function createRow()
{
var uid = (new Date()).getTime();
var row = Ti.UI.createTableViewRow({
height: Ti.UI.SIZE,
selectedBackgroundColor: '#FFFFFF',
layout: "vertical",
borderWidth: 1, borderColor: '#F0F',
width: '100%',
left: 0
});
var label1 = Ti.UI.createLabel({
width: '80%',
left: 0,
text: 'Test 1 ' + uid,
height: Ti.UI.SIZE,
font: {
fontSize: 20
},
textAlign: 'left',
borderWidth: 1, borderColor: '#FF0'
});
row.add(label1);
var label2 = Ti.UI.createLabel({
width: '80%',
right: 0,
text: 'Test 2 ' + uid + ' truncated',
height: Ti.UI.SIZE,
font: {
fontSize: 15
},
textAlign: 'right',
borderWidth: 1, borderColor: '#0F0'
});
row.add(label2);
return row;
}
win.addEventListener('open', function()
{
var data = [];
data.push(createRow());
data.push(createRow());
data.push(createRow());
tableView.setData(data);
});
win.open();
{noformat}
Attachments
Hello Sometimes I found that the items in the table row disappear (Labels and simple Views), but I was unable to reproduce the issue and create an example code. I'm not sure if it is related to this issue.
https://github.com/appcelerator/titanium_mobile_windows/pull/1344
FR Passed. Waiting on Jenkins build.
Merged into master.
*Closing ticket*. Fix verified in SDK Version
8.1.0.v20190304181927
Test and other information can be found at: https://github.com/appcelerator/titanium_mobile_windows/pull/1344