-
Notifications
You must be signed in to change notification settings - Fork 552
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
Calling hideAllHeaders might lead to NullPointerException #229
Comments
@rmunk, thanks to have spotted this, but actually the null pointer itself, here, is not so important, because the series of the calls brings you that exception. So, if I understood well, you want display the headers (sticky) or hide them depending by The fact is that, I have decided to disable sticky headers also if user hides the headers with Now, to resolve your issue you don't need to wait my fix at all. Just be sure that you don't enable sticky if no headers are shown, and re-enable again if you will show them. enableStickyHeaders()
setDisplayHeadersAtStartUp(showSubSites) Then, call
|
Another important question, can you check if, when you call |
I called With the solution you proposed I managed to make it work, but in the end I decided to fill the adapter with list of regular Thanks for your help. |
I have a
FlexibleAdapter
with expandable sticky headers. I want to show or hide headers depending on user selection. It works well on button press, but when I want to set the initial state and callshowAllHeaders()
orhideAllHeaders()
immediately after filling adapter with data it throws aNullPointerException
. CallingsetDisplayHeadersAtStartUp(false)
when configuring adapter doesn't seem to do anything. Also, every time I update the data by callingupdateDataSet
headers become visible so I need to hide the manually again. Is this expected behavior?Here is the sample code and the stack trace:
Stack trace:
The text was updated successfully, but these errors were encountered: