Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24423] Windows Phone: TableViewRow and Label layout not respected

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-03-05T15:14:22.000+0000
Affected Version/sRelease 7.5.0
Fix Version/sRelease 8.1.0
ComponentsWindows
Labelslabel, layout, table, windows
ReporterSandro Lain
AssigneeKota Iguchi
Created2017-02-22T11:11:32.000+0000
Updated2019-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

FileDateSize
Schermata 2017-02-22 alle 12.03.11.png2017-02-22T11:05:08.000+000044351

Comments

  1. Sandro Lain 2017-02-27

    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.
  2. Kota Iguchi 2019-01-07

    https://github.com/appcelerator/titanium_mobile_windows/pull/1344
  3. Samir Mohammed 2019-03-04

    FR Passed. Waiting on Jenkins build.
  4. Kota Iguchi 2019-03-05

    Merged into master.
  5. Samir Mohammed 2019-03-05

    *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

JSON Source