[Android] Fix action mode up and play icons

Nicolas Pomepuy git at videolan.org
Thu Apr 16 15:43:30 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Apr  3 15:37:36 2020 +0200| [608e3559cf78fef28d95e6dba6808b2145d359ae] | committer: Nicolas Pomepuy

Fix action mode up and play icons

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

 .../vlc-android/res/drawable/ic_am_play.xml        | 40 ++++++++++++++++++++++
 .../res/menu/action_mode_audio_browser.xml         |  2 +-
 application/vlc-android/res/values/styles.xml      |  5 +++
 3 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/res/drawable/ic_am_play.xml b/application/vlc-android/res/drawable/ic_am_play.xml
new file mode 100644
index 000000000..20f7613d3
--- /dev/null
+++ b/application/vlc-android/res/drawable/ic_am_play.xml
@@ -0,0 +1,40 @@
+<!--
+  ~ *************************************************************************
+  ~  ic_am_play.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.
+  ~ ***************************************************************************
+  ~
+  ~
+  -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="48dp"
+        android:height="48dp"
+        android:viewportWidth="24"
+        android:viewportHeight="24">
+    <path
+            android:fillAlpha="1"
+            android:fillColor="@color/standard_selection"
+            android:fillType="evenOdd"
+            android:pathData="m5.9528,4.0015c-0.4221,0.026 -0.7514,0.3754 -0.7515,0.7983v14.3981c-0.0008,0.6218 0.6772,1.0067 1.2108,0.6874l11.9984,-7.2005c0.5176,-0.3108 0.5176,-1.061 0,-1.3718l-11.9984,-7.199c-0.1383,-0.083 -0.2984,-0.1222 -0.4593,-0.1125z"
+            android:strokeWidth="1.59978426"
+            android:strokeAlpha="1"
+            android:strokeColor="#00000000"
+            android:strokeLineCap="butt"
+            android:strokeLineJoin="round" />
+</vector>
diff --git a/application/vlc-android/res/menu/action_mode_audio_browser.xml b/application/vlc-android/res/menu/action_mode_audio_browser.xml
index 0123d467d..4e34f4aca 100644
--- a/application/vlc-android/res/menu/action_mode_audio_browser.xml
+++ b/application/vlc-android/res/menu/action_mode_audio_browser.xml
@@ -26,7 +26,7 @@
     <item
         android:id="@+id/action_mode_audio_play"
         android:title="@string/play"
-        android:icon="@drawable/ic_play_w"
+            android:icon="@drawable/ic_am_play"
         app:showAsAction="always"/>
     <item
         android:id="@+id/action_mode_audio_append"
diff --git a/application/vlc-android/res/values/styles.xml b/application/vlc-android/res/values/styles.xml
index 83fa174b1..4a5f93b08 100644
--- a/application/vlc-android/res/values/styles.xml
+++ b/application/vlc-android/res/values/styles.xml
@@ -15,6 +15,7 @@
     <style name="Theme.VLC.Apearance" parent="Theme.MaterialComponents.Light.NoActionBar">
         <item name="marginTopContent">50dp</item>
         <item name="toolbar_popup_style">@style/ThemeOverlay.MaterialComponents</item>
+        <item name="actionModeCloseButtonStyle">@style/ActionModeUpStyle</item>
 
         <item name="android:gridViewStyle">@style/Theme.VLC.List</item>
         <item name="android:expandableListViewStyle">@style/Theme.VLC.List</item>
@@ -634,4 +635,8 @@
 
     </style>
 
+    <style name="ActionModeUpStyle" parent="Widget.AppCompat.Light.ActionButton.CloseMode">
+        <item name="android:tint">@color/white</item> <!-- whatever color -->
+    </style>
+
 </resources>



More information about the Android mailing list