Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5266] iOS: Flow Layout

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2012-06-12T19:20:38.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsparity
ReporterPaul Dowsett
AssigneeMax Stepanov
Created2011-09-12T08:07:14.000+0000
Updated2017-03-20T22:20:12.000+0000

Description

Currently, layout:"horizontal" works differently between Android and iOS, with Android placing each view to the right of the previous view _indefinitely_ and iOS placing in the same way until the views reach the right-hand edge of the screen, in which case the views is wrapped underneath. This is described in TIMOB-3256, which states (also confirmed by Don) that the intention is to fix the horizontal behavior in iOS and introduce a new "flow" layout that wraps views, just as iOS currently does. As many of our developers rely on the current horizontal-flowing behavior on iOS (speak to Pedro about the number of solutions he has provided that use it), I have raised this ticket to track the progress of the new flow layout, and to insure that the flow layout is implemented *BEFORE* the current iOS behavior is removed, as otherwise this will cause many problems.
var win = Ti.UI.createWindow({
backgroundColor:"black",
navBarHidden:false,
title:"Main Window"
});

var scrollView = Ti.UI.createScrollView({
backgroundColor:'blue',
  layout:'horizontal'
//  layout:'flow'
// layout:'vertical'
});

for(var i=0;i<100;i++){
var view = Ti.UI.createView({
  backgroundColor:'green',
  width:94,
  height:94,
  top:10,
  left:10
});
scrollView.add(view);
}

win.add(scrollView);

win.open();

Comments

  1. Marc Wickens 2011-10-03

    Hi, was wondering - has a decision been made on this yet?
  2. Max Stepanov 2012-06-12

    The horizontal layout wrapping is addressed at TIMOB-9385
  3. Natalie Huynh 2012-06-12

    Closing as duplicate: reference TIMOB-9385
  4. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source