Fragments disappeared when dialog was opened
This commit is contained in:
parent
b38cf18236
commit
90fb2b42bf
@ -99,7 +99,8 @@ public class AudioplayerActivity extends MediaplayerActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
if (AppConfig.DEBUG) Log.d(TAG, "onStop");
|
if (AppConfig.DEBUG)
|
||||||
|
Log.d(TAG, "onStop");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,9 +120,12 @@ public class AudioplayerActivity extends MediaplayerActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onSaveInstanceState(Bundle outState) {
|
protected void onSaveInstanceState(Bundle outState) {
|
||||||
|
// super.onSaveInstanceState(outState); would cause crash
|
||||||
|
if (AppConfig.DEBUG)
|
||||||
|
Log.d(TAG, "onSaveInstanceState");
|
||||||
outState.putInt("selectedPosition", currentlyShownPosition);
|
outState.putInt("selectedPosition", currentlyShownPosition);
|
||||||
|
savedPosition = currentlyShownPosition;
|
||||||
resetFragmentView();
|
resetFragmentView();
|
||||||
super.onSaveInstanceState(outState);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -158,6 +162,9 @@ public class AudioplayerActivity extends MediaplayerActivity {
|
|||||||
true);
|
true);
|
||||||
startService(launchIntent);
|
startService(launchIntent);
|
||||||
}
|
}
|
||||||
|
if (savedPosition != -1) {
|
||||||
|
switchToFragment(savedPosition);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user