Android-SlideExpandableListView
Android-SlideExpandableListView copied to clipboard
Derived class did not call super.onsaveinstancestate() - SlideExpandableListView
I was using an ActionSlideExpandableListView in a fragment and when replacing this fragment, before the adapter to the ListView was set, I had the above Exception thrown.
I fixed the issue by changing the onSaveInstanceState() function in SlideExpandableListView to :
@Override
public Parcelable onSaveInstanceState() {
if ( adapter != null )
{
return adapter.onSaveInstanceState(super.onSaveInstanceState());
}
else
{
return super.onSaveInstanceState();
}
}
where it used to say "return null" in the else case. This fixed the issue for me
Worked for me too, otherwise it was crashing on going bakcground and coming back after the fragment has been destroyed. Should it be added to official code?