[Android] Browsers: systematically expand AppBar

Geoffrey Métais git at videolan.org
Wed Dec 12 17:09:52 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 12 16:41:41 2018 +0100| [fe3e4df0334bca1cdbf80a1fac99d2291470a4d8] | committer: Geoffrey Métais

Browsers: systematically expand AppBar

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

 .../src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java        | 4 ++++
 vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt   | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
index 1bd139d40..7af8428c0 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
@@ -130,6 +130,10 @@ public class AudioPlayerContainerActivity extends BaseActivity {
         showTipViewIfNeeded(R.id.audio_player_tips, Constants.PREF_AUDIOPLAYER_TIPS_SHOWN);
     }
 
+    public void expandAppBar() {
+        mAppBarLayout.setExpanded(true);
+    }
+
     @Override
     protected void onStart() {
         ExternalMonitor.INSTANCE.subscribeStorageCb(this);
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
index 8b1902bed..a01987bfe 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
@@ -41,6 +41,7 @@ import org.videolan.medialibrary.media.MediaWrapper
 import org.videolan.tools.coroutineScope
 import org.videolan.vlc.R
 import org.videolan.vlc.databinding.DirectoryBrowserBinding
+import org.videolan.vlc.gui.AudioPlayerContainerActivity
 import org.videolan.vlc.gui.InfoActivity
 import org.videolan.vlc.gui.dialogs.CtxActionReceiver
 import org.videolan.vlc.gui.dialogs.SavePlaylistDialog
@@ -157,6 +158,7 @@ abstract class BaseBrowserFragment : MediaBrowserFragment<BrowserModel>(), IRefr
             setImageResource(R.drawable.ic_fab_play)
             updateFab()
         }
+        (activity as? AudioPlayerContainerActivity)?.expandAppBar()
     }
 
     override fun onResume() {



More information about the Android mailing list