Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want to be able to use headers that does not have a background. #79

Open
woxblom opened this issue Aug 13, 2018 · 3 comments
Open

Want to be able to use headers that does not have a background. #79

woxblom opened this issue Aug 13, 2018 · 3 comments

Comments

@woxblom
Copy link

woxblom commented Aug 13, 2018

Hey and thanks for a great lib!

I have a feature request. I want to be able to use headers that do not have a background. Like a header with just text for example. Atm the item in the list in always shown and the header is put on top to "hide" the list item below. But if I don't want a background on the header then the list item beneath will show at the same time as the header.

Would it be possible for you to make a change so the items in the list turn invisible when its header is attached?

screenshot_1534167225

Cheers!
Magnus

@bgogetap
Copy link
Owner

bgogetap commented Aug 19, 2018

What about the other items scrolling behind it? That would look weird as well.

I think an easier solution would be to add an optional interface that ViewHolders could implement that will have a method called when the ViewHolder is used as a sticky header. In that case you could add/"turn on" a background when that specific item is stickied.

If you really want even the stickied item to have no background, let me know and I can think more on it.

@woxblom
Copy link
Author

woxblom commented Aug 20, 2018

Well my scenario exactly is like this.

I want the sticky header to be a text centered in the middle with a background with rounded corners. The issue I see now is that since it is with rounded corners and has a padding from top you will see the real item in the list scroll out/in when the sticky header becomes visible.

See attached image, here the "Header at 2" in the real list comes in from top and you can see that it slides in underneath the sticky header. That is why the item in the real list needs to be invisible until the sticky header turns invisible. Hope you understand what I mean :P

screenshot_1534752454

@bgogetap
Copy link
Owner

Yes that makes sense.

I'll put some thought into this. Thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants