Search code examples
androidlistviewfooterviewstate

Save Android ListView Header Footer ViewState


I've added a header & footer to my listview both of which have edittext fields. When I rotate the screen the edittext fields are cleared out - the state is not saved. Is there a simple way to tell Android to save the state for header/footer rows? Or do I have to manually save header/footer state myself?


Solution

  • I couldn't find any way to automatically save the state. I had to manually save the state by calling pageHeader.saveHierarchyState(bundle);