[Android] Auto load fragment only when activity is empty

Geoffrey Métais git at videolan.org
Wed Aug 23 18:17:41 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Aug 23 16:57:12 2017 +0200| [9091dacde00a6404acd2614b5365cb11d2e1c16f] | committer: Geoffrey Métais

Auto load fragment only when activity is empty

> https://code.videolan.org/videolan/vlc-android/commit/9091dacde00a6404acd2614b5365cb11d2e1c16f
---

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index dfe6df4ca..d5b7a0049 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -337,8 +337,7 @@ public class MainActivity extends ContentActivity implements FilterQueryProvider
     @Override
     protected void onResumeFragments() {
         super.onResumeFragments();
-        mCurrentFragmentId = mSettings.getInt("fragment_id", R.id.nav_video);
-        if (!currentIdIsExtension())
+        if (mCurrentFragment == null && !currentIdIsExtension())
             showFragment(mCurrentFragmentId);
     }
 



More information about the Android mailing list