[TIMOB-8205] Android: Composite layout - horizontal layout Views don't position children correctly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-03-22T19:36:04.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | parity |
Reporter | Nikhil Sharma |
Assignee | Neeraj Gupta |
Created | 2012-03-22T15:55:27.000+0000 |
Updated | 2017-03-09T23:20:56.000+0000 |
Description
Horizontal layout Views don't position children correctly.
Expected behavior
A red view at the top of the window (full width). An orange view occupying the left half of the red view. A blue square view immediately to the right of the orange view and vertically centered.Repo Steps
1.Run the below code in app.js 2.You will see the blue view actually appears at position top=0
var win1 = Ti.UI.createWindow({
title:'Win 1',
layout:'vertical',
backgroundColor:'#fff'
});
var vw1 = Ti.UI.createView({
layout:'horizontal',
backgroundColor:'red',
width:'100%',
height:75
});
win1.add(vw1);
//
var TheOrange=Ti.UI.createView({height:75,
width:'160dp',
backgroundColor:'orange',
top:0
});
var GreenView=Ti.UI.createView({
height:Ti.UI.SIZE,
width:Ti.UI.SIZE,
focusable:false,
touchEnabled:false,
backgroundColor:'green'
});
GreenView.add(TheOrange);
vw1.add(GreenView);
var BlueView=Ti.UI.createView({
backgroundColor:'blue',
width:50,
height:50
});
vw1.add(BlueView);
//
win1.open();
Attachments
File | Date | Size |
---|---|---|
ios_vs_android.png | 2012-03-22T15:55:28.000+0000 | 63984 |
Android behavior is correct in that the blue box is vertically center. Closing.
Closing ticket as invalid.