[Android] Set elevation on storage browser toast

Geoffrey Métais git at videolan.org
Mon Oct 30 15:28:48 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 30 14:55:52 2017 +0100| [d6cc331880e1adfa6023a0d7b92ce6647cc1bd06] | committer: Geoffrey Métais

Set elevation on storage browser toast

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

 .../src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java
index 19817dbb0..2a0d659e4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java
@@ -38,6 +38,7 @@ import android.view.View;
 import android.widget.CheckBox;
 
 import org.videolan.libvlc.Media;
+import org.videolan.libvlc.util.AndroidUtil;
 import org.videolan.medialibrary.interfaces.EntryPointsEventsCb;
 import org.videolan.medialibrary.media.MediaLibraryItem;
 import org.videolan.medialibrary.media.MediaWrapper;
@@ -84,8 +85,11 @@ public class StorageBrowserFragment extends FileBrowserFragment implements Entry
     @Override
     public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
         super.onViewCreated(view, savedInstanceState);
-        if (mRoot && VLCApplication.showTvUi())
+        if (mRoot && VLCApplication.showTvUi()) {
             mSnack = Snackbar.make(view, R.string.tv_settings_hint, Snackbar.LENGTH_INDEFINITE);
+            if (AndroidUtil.isLolliPopOrLater)
+                mSnack.getView().setElevation(view.getResources().getDimensionPixelSize(R.dimen.audio_player_elevation));
+        }
     }
 
     @Override



More information about the Android mailing list