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 headers don't work when all headers are initially collapsed #268

Closed
inorichi opened this issue Jan 15, 2017 · 2 comments
Closed

Sticky headers don't work when all headers are initially collapsed #268

inorichi opened this issue Jan 15, 2017 · 2 comments

Comments

@inorichi
Copy link

As the title says, if all the headers of the adapter are collapsed when initially calling updateDataSet, sticky headers don't work after expanding them, but it works if I expand one and rotate the screen.

From my investigation, I think this is due to the headersShown property, which is always false if the initial state was collapsed.

I think the problem resides in this line. I don't know if there's a reason to initialize it there, but I think this condition should be outside if (isExpanded(item)), because AFAIK that property only controls whether the headers are visible, but here it also requires that at least one is expanded.

@inorichi
Copy link
Author

Nevermind, it was my fault. I initially had setDisplayHeadersAtStartUp(true) but removed it trying to find another bug I had before and forgot to add it again. Calling this method make them work even if they are initially collapsed.

However, I don't know if the line I mentioned before could still cause another issue, it might be worth to check that just in case.

@davideas
Copy link
Owner

@inorichi, I marked this as bug and also fixed for next version, but since it is not a blocking I leave this issue closed. Thanks.

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

2 participants