[Android] Improve bottom bar visibility and mini player background

Nicolas Pomepuy git at videolan.org
Mon Apr 27 16:24:30 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Apr 27 15:22:54 2020 +0200| [65c8bef48ce33c7bc0eac6516f58830840fb42b2] | committer: Geoffrey Métais

Improve bottom bar visibility and mini player background

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

 .../res/drawable/bottom_navigation_background.xml  | 36 ++++++++++++++++++++++
 .../vlc-android/res/layout/audio_player.xml        |  4 +--
 application/vlc-android/res/layout/main.xml        |  6 ++--
 3 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/application/resources/src/main/res/drawable/bottom_navigation_background.xml b/application/resources/src/main/res/drawable/bottom_navigation_background.xml
new file mode 100644
index 000000000..abebb5149
--- /dev/null
+++ b/application/resources/src/main/res/drawable/bottom_navigation_background.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ *************************************************************************
+  ~  bottom_navigation_background.xml
+  ~ **************************************************************************
+  ~ Copyright © 2020 VLC authors and VideoLAN
+  ~ Author: Nicolas POMEPUY
+  ~ This program is free software; you can redistribute it and/or modify
+  ~ it under the terms of the GNU General Public License as published by
+  ~ the Free Software Foundation; either version 2 of the License, or
+  ~ (at your option) any later version.
+  ~
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  ~ GNU General Public License for more details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with this program; if not, write to the Free Software
+  ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+  ~ ***************************************************************************
+  ~
+  ~
+  -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape android:shape="rectangle">
+            <solid android:color="?attr/card_border" />
+        </shape>
+    </item>
+    <item android:top="1dp">
+        <shape android:shape="rectangle">
+            <solid android:color="?attr/bottom_navigation_background" />
+        </shape>
+    </item>
+</layer-list>
diff --git a/application/vlc-android/res/layout/audio_player.xml b/application/vlc-android/res/layout/audio_player.xml
index 26b728aab..f44cc61c3 100644
--- a/application/vlc-android/res/layout/audio_player.xml
+++ b/application/vlc-android/res/layout/audio_player.xml
@@ -24,7 +24,7 @@
             android:id="@+id/content_layout"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:background="?attr/background_default_darker"
+            android:background="?attr/bottom_navigation_background"
             android:clickable="true"
             android:keyboardNavigationCluster="true"
             tools:targetApi="o"
@@ -78,7 +78,7 @@
                 app:layout_constraintRight_toRightOf="parent"
                 app:layout_constraintTop_toBottomOf="@+id/progressBar"
                 android:fitsSystemWindows="true"
-                android:background="?attr/background_default_darker">
+                android:background="?attr/bottom_navigation_background">
 
             <ImageView
                     android:id="@+id/playlist_playasaudio_off"
diff --git a/application/vlc-android/res/layout/main.xml b/application/vlc-android/res/layout/main.xml
index 588662547..910c2e5b4 100644
--- a/application/vlc-android/res/layout/main.xml
+++ b/application/vlc-android/res/layout/main.xml
@@ -53,12 +53,12 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_gravity="bottom"
-            android:background="?attr/bottom_navigation_background"
-            app:elevation="8dp"
+            android:background="@drawable/bottom_navigation_background"
+            app:elevation="16dp"
             app:itemIconTint="@color/bottom_navigation_selector"
+            app:itemRippleColor="@color/orange500focus"
             app:itemTextColor="@color/bottom_navigation_selector"
             app:labelVisibilityMode="labeled"
-            app:itemRippleColor="@color/orange500focus"
             app:layout_behavior="org.videolan.vlc.gui.helpers.BottomNavigationBehavior"
             app:layout_insetEdge="bottom"
             app:menu="@menu/bottom_navigation" />



More information about the Android mailing list