On the Android, I would like to implement the following type of scrolling grid of thumbnails.
Top two rows scrolls horizontally... and, the whole page including the top two rows scrolls vertically.
Both of the horizontal rows will dynamically load additional images as they are scrolled horizontally... Also, the grid will dynamically load as it is scrolled vertically. (total number of items unknown ahead of time)
The issues I am concerned about are:
Thank you... just getting starting on my Android coding adventures!
(source: brianrice.com)
So for your first two views I would recommend you using HorizontalListView
, then for other items, if they are always 6 squares in a row, create some simple LinearLayout
with horizontal orientation and 6 inner views. As for the whole layout use ordinary ListView
.
There are really nothing special in using HorizontalListView
inside ListView
because they scroll on different axis, however in your adapter you would have to implement getItemViewType(int position)
and getViewTypeCount()
, because you have two different types of views in your layout, using this methods android knows what kind of views to supply for reuse in your convertView
in getView(int position, View convertView, ViewGroup parent)
.
And using this mechanism - view recycling would work perfectly, because it would create at most 2 HorizontalListView
and about 8 other view items.