I want to make a UI
element like a GridView
, I want it's complete functionality but want it to be horizontally scrollable rather than vertically.
By horizontal scroll I mean it should be built that way and not put in a HorizontalScrollView
.
My would be Custom GridView
will have fixed number of rows
say 4-5
and the columns
should be extensible
based on number of items in the Adapter
. You can think of it as the opposite of what the native GridView
does, yet it should maintain the functionality.
I have looked at the source code of how a GridView
is implemented by Google, but I am able to understand very less and starting to make the View
from scratch doesn't seem to be a good idea, since I am afraid I will not be able to do justice to memory optimization's the way Google did it.
I had observed that GridView
extends AbsListView
, so my question is, is it AbsListView
which lets a GridView
scroll vertically and add items from the adapter, or is it GridView
which adds the vertical scrolling ability? Should I tweak GridView
or AbsListView
?
It would be even better to know if there's something which already does what I want to do?
This has already been implemented in native Gallery and YouTube app of Android Honeycomb 3.1 and above. So if anyone has an idea, please elaborate.
Snapshot of Honeycomb Gallery app:
Snapshot of Honeycomb YouTube app:
Canvas
. If you start from scratch let me know. I can help with some ideas. And not to forget it is definitely time consuming. – SurrendersetRotation
in API 11 - developer.android.com/reference/android/view/… . You'll have to rotate the images too.. – Bribe