[Android] Fix background and bottom navigation colors + reduce overdraw

Nicolas Pomepuy git at videolan.org
Mon Apr 20 09:47:37 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Apr 17 08:15:48 2020 +0200| [e2a9a0e1d60c999016c23bb1014c73d791e66a09] | committer: Nicolas Pomepuy

Fix background and bottom navigation colors + reduce overdraw

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

 application/resources/src/main/res/values/attrs.xml              | 2 ++
 application/vlc-android/res/color/bottom_navigation_selector.xml | 4 ++--
 application/vlc-android/res/layout/audio_recyclerview.xml        | 1 -
 application/vlc-android/res/layout/main.xml                      | 2 +-
 application/vlc-android/res/layout/main_browser_fragment.xml     | 1 -
 application/vlc-android/res/layout/more_fragment.xml             | 3 +--
 application/vlc-android/res/values/styles.xml                    | 6 +++++-
 7 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/application/resources/src/main/res/values/attrs.xml b/application/resources/src/main/res/values/attrs.xml
index d70d39129..2b1e520cf 100644
--- a/application/resources/src/main/res/values/attrs.xml
+++ b/application/resources/src/main/res/values/attrs.xml
@@ -27,6 +27,8 @@
     <attr name="item_footer" format="reference|color" />
     <attr name="background_default" format="reference|color" />
     <attr name="header_background" format="reference|color" />
+    <attr name="bottom_navigation_background" format="reference|color" />
+    <attr name="bottom_navigation_color" format="reference|color" />
     <attr name="background_default_darker" format="reference|color" />
     <attr name="background_actionbar" format="reference|color" />
     <attr name="background_menu_divider" format="reference|color" />
diff --git a/application/vlc-android/res/color/bottom_navigation_selector.xml b/application/vlc-android/res/color/bottom_navigation_selector.xml
index 92bb14d17..20263eca7 100644
--- a/application/vlc-android/res/color/bottom_navigation_selector.xml
+++ b/application/vlc-android/res/color/bottom_navigation_selector.xml
@@ -23,6 +23,6 @@
   -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="@color/orange500" android:state_checked="true" />
-    <item android:color="?attr/colorControlNormal" />
+    <item android:color="?attr/colorControlHighlight" android:state_checked="true" />
+    <item android:color="?attr/bottom_navigation_color" />
 </selector>
\ No newline at end of file
diff --git a/application/vlc-android/res/layout/audio_recyclerview.xml b/application/vlc-android/res/layout/audio_recyclerview.xml
index 38c167034..b03ef35ff 100644
--- a/application/vlc-android/res/layout/audio_recyclerview.xml
+++ b/application/vlc-android/res/layout/audio_recyclerview.xml
@@ -7,7 +7,6 @@
         android:id="@+id/audio_list"
         android:layout_width="@dimen/default_content_width"
         android:layout_height="match_parent"
-        android:background="?attr/background_default"
         android:layout_gravity="center_horizontal"
         android:clipToPadding="false" />
 
diff --git a/application/vlc-android/res/layout/main.xml b/application/vlc-android/res/layout/main.xml
index 0edc59ddf..4a5ab1185 100644
--- a/application/vlc-android/res/layout/main.xml
+++ b/application/vlc-android/res/layout/main.xml
@@ -53,7 +53,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_gravity="bottom"
-            android:background="?attr/background_default"
+            android:background="?attr/bottom_navigation_background"
             app:elevation="8dp"
             app:itemIconTint="@color/bottom_navigation_selector"
             app:itemTextColor="@color/bottom_navigation_selector"
diff --git a/application/vlc-android/res/layout/main_browser_fragment.xml b/application/vlc-android/res/layout/main_browser_fragment.xml
index 3688c262f..0529b8b3b 100644
--- a/application/vlc-android/res/layout/main_browser_fragment.xml
+++ b/application/vlc-android/res/layout/main_browser_fragment.xml
@@ -24,7 +24,6 @@
 <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:app="http://schemas.android.com/apk/res-auto"
         android:layout_width="match_parent"
-        android:background="?attr/background_default"
         android:layout_height="match_parent">
 
     <androidx.constraintlayout.widget.ConstraintLayout
diff --git a/application/vlc-android/res/layout/more_fragment.xml b/application/vlc-android/res/layout/more_fragment.xml
index 092010847..69eb6a1e1 100644
--- a/application/vlc-android/res/layout/more_fragment.xml
+++ b/application/vlc-android/res/layout/more_fragment.xml
@@ -32,8 +32,7 @@
             android:id="@+id/swipeLayout"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_gravity="center_horizontal"
-            android:background="?attr/background_default">
+            android:layout_gravity="center_horizontal">
 
         <androidx.core.widget.NestedScrollView
                 android:layout_width="match_parent"
diff --git a/application/vlc-android/res/values/styles.xml b/application/vlc-android/res/values/styles.xml
index 19c2515e8..d3df91b0f 100644
--- a/application/vlc-android/res/values/styles.xml
+++ b/application/vlc-android/res/values/styles.xml
@@ -41,6 +41,8 @@
         <item name="actionModeBackground">@color/grey400</item>
         <item name="item_footer">@color/grey300</item>
         <item name="background_default">@color/white</item>
+        <item name="bottom_navigation_background">@color/white</item>
+        <item name="bottom_navigation_color">@color/grey700</item>
         <item name="progress_indeterminate_tint">@color/white</item>
         <item name="header_background">@color/whitetransparent_ea</item>
         <item name="background_default_darker">@color/grey200</item>
@@ -165,6 +167,8 @@
         <item name="windowActionModeOverlay">true</item>
         <item name="actionModeBackground">@color/grey875</item>
         <item name="background_default">@color/black</item>
+        <item name="bottom_navigation_background">@color/grey875</item>
+        <item name="bottom_navigation_color">@color/grey500</item>
         <item name="header_background">@color/blacktransparent</item>
         <item name="background_default_darker">@color/grey875</item>
         <item name="background_actionbar">@color/black</item>
@@ -190,7 +194,7 @@
         <item name="list_subtitle">@color/grey400</item>
         <item name="list_title_last">@color/list_title_last</item>
         <item name="list_title">@color/white</item>
-        <item name="android:windowBackground">@color/grey900</item>
+        <item name="android:windowBackground">@color/black</item>
 
         <item name="ic_playlist">@drawable/ic_playlist_w</item>
         <item name="ic_playlist_on">@drawable/ic_playlist_on</item>



More information about the Android mailing list