Codewaves / Sticky-Header-Grid

Sticky header grid layout manager for RecycleView
MIT License
116 stars 33 forks source link

How to disable headers? #15

Closed Konrad-Morawski closed 5 years ago

Konrad-Morawski commented 6 years ago

I'm testing the library. I appreciate your work.

My question is, what's the best way for actually disabling the headers functionality?

The point is that I don't always need them on the RecyclerView I'm using, so I'd like to be able to switch it off conditionally.

Is the recommended way to simply return empty / invisible Views from onCreateHeaderViewHolder? This seems to do the trick, but I wonder if there was perhaps some more elegant way of accomplishing this.

Codewaves commented 6 years ago

I don't think that there is another way. Library doesn't support headers hide.

D330 commented 6 years ago

Just give header view Visibility.GONE