[TIMOB-5267] Android: Flow Layout
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-06-17T23:46:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | parity |
Reporter | Paul Dowsett |
Assignee | Allen Yeung |
Created | 2011-09-12T08:08:10.000+0000 |
Updated | 2017-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();
Closing ticket as duplicate.