Is it possible to save and restore the state (which items are collapsed and which not) of an ExpandableListView in Android?
If it is possible, how can I do that?
Can I access the ExpandableListView in onPause() / onResume() and how?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I iterate through the groups and save the state of them all:
Then for restore the state:
I don’t understand what you mean by how to access the ListView in onPause() / onResume(), it should be accessible from there if you store the ListView object as a member of the activity class.