Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9385] iOS: Implement conditional horizontal layout wrapping

GitHub Issuen/a
TypeSub-task
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-18T12:37:27.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 2.1.0, Sprint 2012-12 Core
ComponentsiOS
Labelscore, layout, look1, parity
ReporterMax Stepanov
AssigneeMax Stepanov
Created2012-06-05T13:20:17.000+0000
Updated2017-03-16T22:52:30.000+0000

Description

*horizontalWrap:boolean* property will control warp/no-wrap (default is true) // all color boxes should be contained within one row (no wrapping)
var win = Ti.UI.createWindow({ fullscreen: true, backgroundColor: 'white'});
 
var parent = Ti.UI.createView({backgroundColor:'red',layout:'horizontal', horizontalWrap: false, width:Ti.UI.SIZE, height:300})
 
var child1 =Ti.UI.createView({backgroundColor:'green',height:60,width:130});
var child2 =Ti.UI.createView({backgroundColor:'blue',height:120,width:170});
var child3 =Ti.UI.createView({backgroundColor:'#eee',height:120,width:50});
var child4 =Ti.UI.createView({backgroundColor:'#666',height:60,width:50});
  
parent.add(child1);
parent.add(child2);
parent.add(child3);
parent.add(child4);
  
win.add(parent);
win.open();

Ti.API.info("Default HorizonalWrap is "+child1.horizontalWrap);
Ti.API.info("HorizonalWrap for parent is "+parent.horizontalWrap);

Comments

  1. Max Stepanov 2012-06-11

    PR pending https://github.com/appcelerator/titanium_mobile/pull/2369
  2. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source