[TIMOB-12481] BlackBerry: Vertical layout breaks when trying to fill child
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-02-12T22:54:41.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.1.0, 2013 Sprint 04 BB, 2013 Sprint 04 |
Components | BlackBerry |
Labels | n/a |
Reporter | Josh Roesslein |
Assignee | Russell McMahon |
Created | 2013-01-29T21:27:31.000+0000 |
Updated | 2013-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.
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