Possible Duplicate:
ViewPager and fragments — what's the right way to store fragment's state?
how can I save the fragment? (It is located at the activity) When I rotate the screen, the activity being restarted, fragment is re-created
Possible Duplicate:
ViewPager and fragments — what's the right way to store fragment's state?
how can I save the fragment? (It is located at the activity) When I rotate the screen, the activity being restarted, fragment is re-created
try to use setRetainInstance(true);
in your fragment's onCreate
You need to add orientation to android:configChanges in your AndroidManifest.xml. Per example:
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"