[TIMOB-10858] Android: horizontalWrap:false does not work well with horizontal views nested into a vertical view
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-09-17T15:25:36.000+0000 |
Affected Version/s | Release 2.1.2 |
Fix Version/s | n/a |
Components | Android |
Labels | core, layout, regression |
Reporter | Imobach Martín |
Assignee | Allen Yeung |
Created | 2012-09-06T16:27:40.000+0000 |
Updated | 2017-03-21T23:11:09.000+0000 |
Description
There is a problem with the property horizontalWrap. In this case, when it's set to false and used with horizontal views nested into a vertical view.
I've created a minimal example code:
var win = Titanium.UI.createWindow({title:'UI-Test' });
var parentView,i, blockH, labelL, labelR;
parentView = Ti.UI.createView({layout: 'vertical',top:1,backgroundColor:'yellow'});
for(i = 0; i< 5; i++){
blockH = Ti.UI.createView({layout:'horizontal',horizontalWrap: false,height:Ti.UI.SIZE,backgroundColor:'blue'});
labelL = Ti.UI.createLabel({left:10,width: '30%',text:'label' + i,backgroundColor: 'red'});
labelR = Ti.UI.createLabel({left: 1,width: '70%',backgroundColor:'green',
text:'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'});
blockH.add(labelL);
blockH.add(labelR);
parentView.add(blockH);
}
win.backgroundColor = 'black';
win.add(parentView);
win.open();
I've attached a file, called 'UI-Test-sdk-2-1-0.png', with the expected result using Titanium SDK 2.1.0GA in both emulators
And another file, called 'UI-Test-sdk-2-1-2.png', with the bugged result using Titanium SDK 2.1.0GA in both emulators
This issue is related to TIMOB-10003 and TIMOB-10173
Works well with Titanium SDK versions 2.1.0GA and 2.1.1GA in both emulators (Android, iPhone)
Regards
Attachments
File | Date | Size |
---|---|---|
UI-Test-sdk-2-1-0.png | 2012-09-06T16:27:40.000+0000 | 56553 |
UI-Test-sdk-2-1-2.png | 2012-09-06T16:27:40.000+0000 | 40590 |
A regression issue.
This is a duplicate of TIMOB-10812, which has been resolved.
I have tested the issue against sdk 2.1.3.v20120915120319, launched recently. It says to have TIMOB-10812 resolved. But the issue described here is still present. I still get a full yellow view in android, like shown on the attached photo.
It turns out I left out a change in the original PR for TIMOB-10003 that caused this to be broken in the 2_1_X branch. I created a backport for this: https://github.com/appcelerator/titanium_mobile/pull/3005
Closing ticket as duplicate with reference to the above comments.