29 plus ones
Shared publicly•View activity
- Dec 22, 2014
- Nice tutorial. :)
HeaderGridView extends GridView extends AbsListView. We should stop using ListViews now that we have RecyclerView.Dec 22, 2014
- Thanks Erik. I'm well aware of the actual reasons to use RecylcerView, and they do not involve a bandwagon.Dec 22, 2014
- So you recommend us to still use views based on AbsListView in most situations?Dec 22, 2014
- Nope, but there's a lot of code out there, and most of it based on AbsListView. In many instances, where you don't need fancy animations, or reordering, or staggering, it's simply faster and easier to drop in the class I linked, than to rewrite an implementation to use RecyclerView. This is especially true if your only objective is to add a simple header.
Chiu-Ki's post made it seem as though she did not know about it, which is not unusual given it's hidden nature, so I thought it'd be useful information. At no point did I recommend it over RecyclerView.Dec 22, 2014
- You can also implement sort of a header using padding on the GridView, clipToPadding="false" and some translation on the header...
It only supports one header and one footer, but works great...Dec 22, 2014
- Welcome to Android, where there are multiple ways to do the same thing!
Indeed I did not know about HeaderGridView. This article came out of a bigger use case where I will be deleting items, so I plan to try out the animations from RecyclerView as well.Dec 22, 2014