overide FragmentActivity onSaveInstanceState method like this.
1
2
3
4
5
6
7
8
9
|
@Override
public
void
onSaveInstanceState(Bundle outState) {
super
.onSaveInstanceState(outState);
if
(outState !=
null
) {
String FRAGMENTS_TAG =
"android:support:fragments"
;
// remove掉保存的Fragment
outState.remove(FRAGMENTS_TAG);
}
}
|