[TIMOB-3203] Android & iOS Bug: layout on view causes unexpected results
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-08-08T14:56:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | 1.6, android, bug, ios, layout, view |
Reporter | Alan Leard |
Assignee | Blain Hamon |
Created | 2011-04-15T03:39:22.000+0000 |
Updated | 2017-03-24T18:20:05.000+0000 |
Description
If you apply layout:'horizontal' to a view, the label disappears
on iOS and is truncated in Android.
Test Code:
var win = Ti.UI.createWindow({
backgroundColor: '#000'
});
var view = Ti.UI.createView({
//layout:'horizontal',
left:0,
right:0
});
var label = Titanium.UI.createLabel({
text:'TEST',
color:'#000000',
top:2,
right:15,
height:26,
left: 15,
backgroundColor:'#fff'
});
view.add(label);
win.add(view);
win.open();
remove comment for layout to test behavior.
Related HD Ticket: http://developer.appcelerator.com/helpdesk/view/74191">http://developer.appcelerator.com/helpdesk/view/74191
Horizontal layout makes room by asking for the minimum needed. At time of writing, the minimum needed by a view with undefined width is '0'. As of 2.0, the minimum needed is Ti.UI.SIZE, which is much less than without horizontal layout. In short, marking invalid.
Closing ticket as invalid with reference to the above comments.