Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom GridView in Android (trying to copy WindowsMediaPlayer album layout) [duplicate]

Is it possible to use categories or some sort of headers with a GridView in Android?

I put together a quick illustration of what I was thinking about:

enter image description here

Thanks a lot.

like image 761
Michell Bak Avatar asked Sep 13 '11 07:09

Michell Bak


3 Answers

You can use Stickygridheaders library directly or as a model to create your own widget.

like image 120
Andrei B. Avatar answered Oct 14 '22 20:10

Andrei B.


probably this code will help you. This is SectionedGridRecyclerViewAdapter, result looks like this:

enter image description here

like image 22
girlOnSledge Avatar answered Oct 14 '22 20:10

girlOnSledge


I think You can do it but you have to implement Jeff Shrkey's SeparatedListAdapter

There isn’t an easy way of creating these separated lists, so I’ve put together SeparatedListAdapter which does it quickly. To summarize, we’re creating a new BaseAdapter that can contain several other Adapters, each with their own section headers.

like image 42
ingsaurabh Avatar answered Oct 14 '22 19:10

ingsaurabh