I'm completely shocked that I can't find anything about how to do this. How do I wrap images in a layout to just drop down to the next line.. and continue to do so until all of the images have been shown? I'm using 80x80 images as buttons and when however many can fit on one line, I want it to wrap them to the next line and continue. When those have reached the end, I want it to wrap again.
Can someone please show me how to build this layout? Thank you.
In API 12 and earlier, you want:
In API 13 and later, replace lines 5-7 with the following:
I think what you may be looking for is the GridView which uses a ListAdapter to get its data from. See http://developer.android.com/reference/android/widget/GridView.html for more details. Also see [Android SDK Directory]/samples/ApiDemos/src/com/example/android/apis/view/Grid1.java for a demo of a simple launcher using the grid. (Full example code listed below.)