Okay thanks On 17 jan, 13:41, Mark Murphy <mmur...@commonsware.com> wrote: > On Tue, Jan 17, 2012 at 7:31 AM, Dave <dave.mahabiers...@hotmail.com> wrote: > >http://developer.android.com/reference/android/widget/GridView.html > > > The default way the elements of the array is put in a GridView is > > zigzagging left-right-down. > > > e.g. array {1,2,3,4,5,6,7,8,9,10} becomes > > by default (with columns fixed to 3) > > > 1,2,3 > > 4,5,6 > > 7,8,9 > > 10 > > > Is there a way to get to zigzag up-down-right (with rows fixed to 3)? > > > 1,4,7,10 > > 2,5,8 > > 3,6,9 > > Change your adapter to serve out the items in that order. Or, rewrite > GridView. Note that your example shows a mismatch of columns (4 in > first row, 3 in others), which GridView does not support, except for > the last row. > > > Also I like to be able to enforce a column move in getView. Free > > zigzag style: No fixed number of columns columns or rows: > > For instance in free up-down-right zigzag > > 1,5,6,9 > > 2, 7,10 > > 3, 8 > > 4 > > Write your own AdapterView. > > If you do not need selection events and your roster of items is small > enough (<100), the new GridLayout in Android 4.0, wrapped in a > ScrollView, can probably handle what you need. I think I saw a > backport of GridLayout for earlier versions of Android floating around > GitHub. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > _The Busy Coder's Guide to Android Development_ Version 3.7 Available!- Tekst > uit oorspronkelijk bericht niet weergeven - > > - Tekst uit oorspronkelijk bericht weergeven -
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en