diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-04-05 11:33:40 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-04-05 11:33:40 +0200 |
commit | 90fb2b42bf5ce37666dc29f4d0f486657ce60ab0 (patch) | |
tree | b76c01efe8b24b87c8ef5d4c54fdead04b64f838 /src/de | |
parent | b38cf1823653daa9c3fb03e788f698c8bd5b3319 (diff) | |
download | AntennaPod-90fb2b42bf5ce37666dc29f4d0f486657ce60ab0.zip |
Fragments disappeared when dialog was opened
Diffstat (limited to 'src/de')
-rw-r--r-- | src/de/danoeh/antennapod/activity/AudioplayerActivity.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/de/danoeh/antennapod/activity/AudioplayerActivity.java b/src/de/danoeh/antennapod/activity/AudioplayerActivity.java index 6231e2a22..f88e45305 100644 --- a/src/de/danoeh/antennapod/activity/AudioplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/AudioplayerActivity.java @@ -99,7 +99,8 @@ public class AudioplayerActivity extends MediaplayerActivity { @Override protected void 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 protected void onSaveInstanceState(Bundle outState) { + // super.onSaveInstanceState(outState); would cause crash + if (AppConfig.DEBUG) + Log.d(TAG, "onSaveInstanceState"); outState.putInt("selectedPosition", currentlyShownPosition); + savedPosition = currentlyShownPosition; resetFragmentView(); - super.onSaveInstanceState(outState); } @Override @@ -158,6 +162,9 @@ public class AudioplayerActivity extends MediaplayerActivity { true); startService(launchIntent); } + if (savedPosition != -1) { + switchToFragment(savedPosition); + } } @Override |