[Android] Set current fragment reference on restore

Geoffrey Métais git at videolan.org
Mon Jun 19 18:06:27 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jun 19 09:46:54 2017 +0200| [d9f5c0ad523f12c302ddb2a38e472c6444ee6060] | committer: Geoffrey Métais

Set current fragment reference on restore

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index a7ac961b4..dc1c0b4a2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -146,6 +146,7 @@ public class MainActivity extends AudioPlayerContainerActivity implements Filter
 
         if (savedInstanceState != null) {
             mCurrentFragmentId = savedInstanceState.getInt("current");
+            mCurrentFragment = getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder);
             if (mCurrentFragmentId > 0)
                 mNavigationView.setCheckedItem(mCurrentFragmentId);
         }



More information about the Android mailing list