GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-18T17:33:32.000+0000 |
Affected Version/s | Release 1.7.2, Release 1.7.3, Release 1.7.4, Release 1.7.5, Release 1.8.0.1, Release 2.0.0, Release 1.8.1 |
Fix Version/s | Release 2.0.0, Sprint 2012-06 |
Components | iOS |
Labels | module_view, parity, qe-testadded |
Reporter | Dustin Hyde |
Assignee | Vishal Duggal |
Created | 2012-02-06T18:27:26.000+0000 |
Updated | 2012-11-19T19:07:46.000+0000 |
When the layout property of a View is set to 'vertical' or 'horizontal', children do not display. Works on Android.
Tested on Views and Windows using Labels, TextFields, and Buttons.
Steps to Reproduce:
1. Run Code:
var win = Ti.UI.createWindow({
backgroundColor:'red',
layout:'horizontal'
});
var left = Ti.UI.createLabel({
title:'Left',
backgroundColor:'blue',
color:'black',
width:'50%',
height:'100%'
});
var right = Ti.UI.createLabel({
title:'Right',
backgroundColor:'green',
color:'black',
width:'50%',
height:'100%'
});
win.add(left);
win.add(right);
win.open();
Expected Result:
There should be a blue bar and a green bar (two labels in a horizontal layout). Screenshot attached.
Actual Result:
Red background (only the window background). Screenshot attached.
May be related to the use of percentage values.
The work-around is to use an 'absolute' (default) layout with percentages relative to the boundaries (top, bottom, left, right).
Closing bug. Verified fix on: SDK build: 2.0.0.v20120315140247 Titanium Studio, build: 2.0.0.201203142055 xcode: 4.2 Device: iphone 4s (5.0.1)
reopening/closing to add/remove labels