Re: [android-developers] Saving fragment state in a view pager

2011-10-27 Thread Dianne Hackborn
FragmentStatePageAdapter does this all for you. You shouldn't be keeping a separate map or whatever of fragment objects. If there is state you want to retain across instances, you need to implement onSaveInstanceState() to save it. This will be called by FragmentStatePageAdapter for you when it

[android-developers] Saving fragment state in a view pager

2011-08-02 Thread Android Noob
I'm relatively new to android and I'm having trouble trying to save the state of Fragments as I switch from one page to the next using the FragmentStatePageAdapter. I have a ViewPager in an activity with five fragments in it and a HashMap that's used to cache fragments. In fragment 0, I have a lo