How to make the height of a GridView wrap its content

The other day I wanted to group the items in my GridView and separate the groups with headers. Unfortunately, it turned out that GridView doesn’t support headers out-of-the-box.

Instead of rewriting the GridView or write a messy adapter for it, I tried out to group a TextView (the header) and a GridView (the group content) into a separate Fragment and then add multiple instances of that fragment to a ScrollView. It worked like a charm — almost…


Continue Reading

End of content

No more pages to load

Close Menu