-
Notifications
You must be signed in to change notification settings - Fork 143
Add hasHeaderInSection(int section)
method in the adapter
#7
Comments
Could you please elaborate a little further on why you need this? If you don't want a header for a section, then don't group those things into different sections. For instance, if you want 2 sections with 3 elements each, but don't want header in the second section, then either hide such header or make a single section with 6 elements. The requirement that you are requesting can be implemented with the current state of the library. |
I want to know how you can remove header for the first section. |
You could just set its visibility to GONE |
@truizlop Thanks. got it working. |
You have to override Then, when you implement |
@truizlop Thankyou so much.That worked |
@truizlop Facing the same issue. Even though I'm setting the header's visibility to View.GONE, the item decoration adding vertical spacing is effective. So, instead of header, I get double vertical spacing on top. I think hasHeaderInSection would be clean way to fix this. |
Hi there,
It would be awesome if you could add a
protected boolean hasHeaderInSection(int section)
(defaulttrue
for convenience and retro-compatibility).There are 2 small usages of the
hasFooterInSection
method so this change should be relatively lightweight.That would help us use your library without tricks with a RecyclerView having
app:stackFromEnd
set totrue
(drawing from the bottom to the top).That would also help some users to use this library for separators, if they want to not show the first header for example.
The text was updated successfully, but these errors were encountered: