Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14129] BlackBerry: Ti.UI.SIZE for width on components break position

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-06-06T18:43:25.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.1.1
ComponentsBlackBerry
Labelsmodule_layout, qe-3.1.1, qe-nfc, qe-testadded
ReporterPedro Enrique
AssigneePedro Enrique
Created2013-06-05T21:34:56.000+0000
Updated2013-06-24T22:07:17.000+0000

Description

Problem

When creating a UI component and giving it a width of Ti.UI.SIZE, the component will be placed at the 0,0 position of the parent view, no matter if top, left, right, and bottom are defined.

Code

var win = Ti.UI.createWindow({});

var button = Ti.UI.createButton({
    top: 100,
    left: 50,
    width: Ti.UI.SIZE,
    title: 'this is a button'
});

win.add(button);
win.open();

More

If margins are given, the component must respect them - not ignore them. If margin are not given, the component must be centered in the parent view, not be placed at 0,0

Comments

  1. Pedro Enrique 2013-06-06

    Backport to 3.1.x https://github.com/appcelerator/titanium_mobile_blackberry/pull/84
  2. Lokesh Choudhary 2013-06-06

    Verified the fix & the top & left are not ignored but respected. Thus closing. Environment: Ti Studio : 3.1.1.201306041657 Ti BB SDK : 3.1.1.v20130606121419 Mac OSX : 10.8.3 Alloy : 1.1.3-cr CLI - 3.1.1-cr win 7 Win 8 Z10 BB simulator : 10.0.10.822 Z10 device running 10.0.10.88

JSON Source