[Android] Fix secondary activity display with AppCompat 27

Geoffrey Métais git at videolan.org
Wed Apr 4 18:34:41 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb 23 13:20:35 2018 +0100| [e006ef9ce059faa649a85aa77f9da5664f9630cf] | committer: Geoffrey Métais

Fix secondary activity display with AppCompat 27

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

 vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java b/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java
index 141d4622c..d32be5790 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java
@@ -77,8 +77,8 @@ public class SecondaryActivity extends ContentActivity {
         initAudioPlayerContainerActivity();
         getSupportActionBar().setDisplayHomeAsUpEnabled(true);
 
-        if (getSupportFragmentManager().getFragments() == null) {
-            String fragmentId = getIntent().getStringExtra(KEY_FRAGMENT);
+        if (getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder) == null) {
+            final String fragmentId = getIntent().getStringExtra(KEY_FRAGMENT);
             fetchSecondaryFragment(fragmentId);
             if (mFragment == null){
                 finish();



More information about the Android mailing list