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

Sticky header is disappearing when scrolling #575

Closed
jrcacd opened this issue Mar 22, 2018 · 8 comments
Closed

Sticky header is disappearing when scrolling #575

jrcacd opened this issue Mar 22, 2018 · 8 comments

Comments

@jrcacd
Copy link
Contributor

jrcacd commented Mar 22, 2018

When scroll and the header reaches the top, it disappears

adapter.layoutManager = StaggeredGridLayoutManager(...)
adapter.setDisplayHeadersAtStartUp(true)
adapter.setStickyHeaders(true)
@davideas
Copy link
Owner

@jrcacd, please more information.

@jrcacd
Copy link
Contributor Author

jrcacd commented Mar 22, 2018

After #521 has fixed the above started.

@mattlaabs
Copy link

I might experience the same bug, can't tell exactly when it started.
Scenario is: sticky headers and under the current header there are more items than fit on the screen.
When scrolling down, the next header does not show up in place but replaces the current header at the sticky position while leaving an empty space at its correct position. Once the new header is scrolled to the top, everything looks ok. Scrolling up works fine.
A temporary workaround for me is to set a 0-sized recycler pool for the header view. (Probably has performance impact, but not relevant for my scenario.)

@jrcacd
Copy link
Contributor Author

jrcacd commented Mar 22, 2018

The same bug

@davideas davideas added bug and removed duplicate labels Mar 22, 2018
@davideas davideas reopened this Mar 22, 2018
@davideas
Copy link
Owner

davideas commented Mar 22, 2018

If you use 5.0.1, do you still have the issue?
I think it is related to #568. I have verified the bug described by @mattlaabs, but I have to manually call onViewRecycled() with the old sticky header.

@mattlaabs
Copy link

With 5.0.1 the issue is not reproducible for me.
I never call onViewRecycled() manually.

@davideas
Copy link
Owner

@mattlaabs, I, have to recycle manually. So you confirm that is related to the change I made in 5.0.2.

I have put back the old code in the StickyHeaderHelper where I set the view not recyclable, the issue doesn't appear anymore, this means the view must not be recycled, and I will recycle manually when not visible anymore.

@mattlaabs
Copy link

Yes, just switched back to 5.0.2 (with the 0-sized pool workaround removed) and the error is back.

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

No branches or pull requests

3 participants