Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12481] BlackBerry: Vertical layout breaks when trying to fill child

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-02-12T22:54:41.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.1.0, 2013 Sprint 04 BB, 2013 Sprint 04
ComponentsBlackBerry
Labelsn/a
ReporterJosh Roesslein
AssigneeRussell McMahon
Created2013-01-29T21:27:31.000+0000
Updated2013-02-13T01:23:38.000+0000

Description

If a parent view using vertical layout has a child that "fills" the parent, the layout breaks and nothing seems to get properly computed.

Test

var win = Ti.UI.createWindow({layout:'vertical'});

var label = Ti.UI.createLabel({
	text: 'Type some stuff...',
	width: '75%', height: 50
});
win.add(label);

var textField = Ti.UI.createTextField({
	width: '75%', height: 75
});
win.add(textField);

var button = Ti.UI.createButton({
	title: 'Click, me!',
	width: '75%', height: 100
});
win.add(button);

// Not exlicitly setting a height causing layout to break here.
// The height should be computed to fill the rest of the parent's height.
var view = Ti.UI.createView({
	backgroundColor: 'red'
});
win.add(view);

win.open();
Expected: The red view should fill the remaining height of the parent. Actual: None of the views get computed correctly causing nothing to show up.

Comments

  1. Lokesh Choudhary 2013-02-13

    Verified the issue by running the attached code & seeing the expected results Environment: Ti Studio : 3.1.0.201302101654 Ti BB SDK : 3.1.0.v20130212145409 Mac OSX : 10.8.2 win 7 64 bit Win 8 BB simulator : 10.0.9.386

JSON Source