Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5267] Android: Flow Layout

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionDuplicate
Resolution Date2012-06-17T23:46:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsparity
ReporterPaul Dowsett
AssigneeAllen Yeung
Created2011-09-12T08:08:10.000+0000
Updated2017-03-20T22:20:26.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. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source