android - Retaining fragment state along with activity -
i have retained state of activity while switching between activities setting intent flag single top. activity contains fragment.the activity state gets retained fragment gets recreated. how retain activity state along fragment state android using flags?
you can call fragment.setretaininstance(true);
method tell fragment should retain it's state when activity recreated:
http://developer.android.com/reference/android/app/fragment.html#setretaininstance(boolean)
Comments
Post a Comment