Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24858] Windows: TableViewRow defaults to horizontal layout

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-11-07T12:19:09.000+0000
Affected Version/sRelease 6.1.0, Release 6.1.1
Fix Version/sRelease 7.0.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-06-20T11:40:37.000+0000
Updated2017-11-17T00:27:28.000+0000

Description

TableViewRow defaults to horizontal on Windows, this is evidenced by the below code where the labels are added next to the last label added rather than at the right hand side of the TableViewRow, and row.layout logging horizontal
var _window = Ti.UI.createWindow();
var row = Ti.UI.createTableViewRow({
    width: 300,
    height: 40
});
var nameLabel = Titanium.UI.createLabel({
    text: 'Title',
    left: 10
});
row.add(nameLabel);
var tableView = Ti.UI.createTableView({
    top: 0,
    width: 300,
    height: Ti.UI.SIZE,
    data: [row]
});
var addButton = Ti.UI.createButton({
    title: 'Add Label',
    width: 200,
    height: 100
});

addButton.addEventListener('click', function() {
    var valueLabel1 = Ti.UI.createLabel({
        text: 'New Label'
    });
    row.add(valueLabel1);
});
_window.add(tableView);
_window.add(addButton);
console.log(row.layout);
_window.open();

Steps to reproduce

Steps to reproduce

Add the above to an existing app.js

Build for a windows target

Click the button

Actual

Label is added to the right of the last Label

Expected

Labels should be added at the far end of the TableViewRow

Comments

  1. Kota Iguchi 2017-10-26

    https://github.com/appcelerator/titanium_mobile_windows/pull/1153
  2. Abir Mukherjee 2017-11-17

    Tested on SDK 7.0.0.v20171116132144 installed from CLI. Fix is verified.

JSON Source