Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24828] Windows: Unexpected layout for second UI element in a View

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-07-27T13:18:05.000+0000
Affected Version/sRelease 6.1.0
Fix Version/sRelease 6.2.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-06-15T13:58:08.000+0000
Updated2017-08-14T11:08:16.000+0000

Description

Description

With the below code, the second TextField does not stretch the width of the view as expected, commenting left or right on the first TextField will make it stretch, this occurs for all UI elements
var _window = Ti.UI.createWindow();
var txtUsername = Ti.UI.createTextField({
    top: 50,
    left: 10,
    right: 10,
    hintText: 'Username'
});
var txtPassword = Ti.UI.createTextField({
    top: 150,
    left: 10,
    right: 10,
    hintText: 'Password'
});
var view = Ti.UI.createView({
    height: 480,
    width: 320,
    borderColor: 'green',
    borderWidth: 5,
    backgroundColor: 'red'
});
view.add(txtPassword)
view.add(txtUsername);
_window.add(view);
_window.open();

Steps to reproduce

Add the above to an existing app.js

Build for a windows target

Actual

Second TextField does not stretch the width of the view

Expected

Second TextField should stretch the width of the view

Comments

  1. Kota Iguchi 2017-06-29

    https://github.com/appcelerator/titanium_mobile_windows/pull/1025
  2. Ewan Harris 2017-07-27

    6_2_X backport merged in https://github.com/appcelerator/titanium_mobile_windows/pull/1048 Awaiting the build before closing
  3. Ewan Harris 2017-08-14

    Verified in 6.2.0.v20170811022027

JSON Source