I have a FragmentActivity with a ViewPager instance that uses a FragmentPagerAdapter. I create a list of fragments instances first, and then pass it to the adapter so it can return the right fragment for the right page.
My question now is how to handle Activity recreation. Suppose the app is stopped, in the background the activity is destroyed, and lateron the activity is resumed. I know in onCreate of the activity will recreate fragments first, based on the FragmentState instances it was passed in the bundle. Then a set of other fragments is created and passed to the adapter, which is of course not what I want.
What is the common practice here? Is it acceptable/possible to avoid recreating the fragments in the onCreate method? Or should I try to reuse the recreated fragments and pass them to the adapter?