Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10858] Android: horizontalWrap:false does not work well with horizontal views nested into a vertical view

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2012-09-17T15:25:36.000+0000
Affected Version/sRelease 2.1.2
Fix Version/sn/a
ComponentsAndroid
Labelscore, layout, regression
ReporterImobach Martín
AssigneeAllen Yeung
Created2012-09-06T16:27:40.000+0000
Updated2017-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

FileDateSize
UI-Test-sdk-2-1-0.png2012-09-06T16:27:40.000+000056553
UI-Test-sdk-2-1-2.png2012-09-06T16:27:40.000+000040590

Comments

  1. Anirudh Nagesh 2012-09-11

    A regression issue.
  2. Allen Yeung 2012-09-17

    This is a duplicate of TIMOB-10812, which has been resolved.
  3. Imobach Martín 2012-09-19

    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.
  4. Allen Yeung 2012-09-19

    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
  5. Lee Morris 2017-03-21

    Closing ticket as duplicate with reference to the above comments.

JSON Source