[Android] Fix audio player seekbar color

Nicolas Pomepuy git at videolan.org
Wed Aug 5 14:25:24 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Aug  3 12:08:42 2020 +0200| [28719d1a6b088a31b8c6c5be2fceda4b4b00c9e2] | committer: Nicolas Pomepuy

Fix audio player seekbar color

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

 .../main/res/drawable/ic_seekbar_thumb_audio.xml   |  6 ++++
 .../res/drawable/ic_seekbar_thumb_audio_normal.xml | 37 ++++++++++++++++++++++
 .../drawable/ic_seekbar_thumb_audio_pressed.xml    | 37 ++++++++++++++++++++++
 .../vlc-android/res/layout-land/audio_player.xml   |  2 +-
 .../vlc-android/res/layout/audio_player.xml        |  2 +-
 5 files changed, 82 insertions(+), 2 deletions(-)

diff --git a/application/resources/src/main/res/drawable/ic_seekbar_thumb_audio.xml b/application/resources/src/main/res/drawable/ic_seekbar_thumb_audio.xml
new file mode 100644
index 000000000..0dbc97e86
--- /dev/null
+++ b/application/resources/src/main/res/drawable/ic_seekbar_thumb_audio.xml
@@ -0,0 +1,6 @@
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/ic_seekbar_thumb_audio_pressed" android:state_focused="true" android:state_pressed="false"/>
+    <item android:drawable="@drawable/ic_seekbar_thumb_audio_pressed" android:state_focused="true" android:state_pressed="true"/>
+    <item android:drawable="@drawable/ic_seekbar_thumb_audio_pressed" android:state_focused="false" android:state_pressed="true"/>
+    <item android:drawable="@drawable/ic_seekbar_thumb_audio_normal"/>
+</selector>
diff --git a/application/resources/src/main/res/drawable/ic_seekbar_thumb_audio_normal.xml b/application/resources/src/main/res/drawable/ic_seekbar_thumb_audio_normal.xml
new file mode 100644
index 000000000..b6a292054
--- /dev/null
+++ b/application/resources/src/main/res/drawable/ic_seekbar_thumb_audio_normal.xml
@@ -0,0 +1,37 @@
+<!--
+  ~ *************************************************************************
+  ~  ic_seekbar_thumb_normal.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 android:height="28dp"
+        android:viewportHeight="14"
+        android:viewportWidth="14"
+        android:width="28dp"
+        xmlns:android="http://schemas.android.com/apk/res/android">
+    <path
+            android:fillAlpha="1"
+            android:fillColor="@color/orange500"
+            android:fillType="nonZero"
+            android:pathData="m10,7a3,3 90,1 1,-6 0,3 3,90 1,1 6,0z"
+            android:strokeColor="#00000000"
+            android:strokeWidth="1" />
+</vector>
diff --git a/application/resources/src/main/res/drawable/ic_seekbar_thumb_audio_pressed.xml b/application/resources/src/main/res/drawable/ic_seekbar_thumb_audio_pressed.xml
new file mode 100644
index 000000000..621a83bbc
--- /dev/null
+++ b/application/resources/src/main/res/drawable/ic_seekbar_thumb_audio_pressed.xml
@@ -0,0 +1,37 @@
+<!--
+  ~ *************************************************************************
+  ~  ic_seekbar_thumb_pressed.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 android:height="28dp"
+        android:viewportHeight="14"
+        android:viewportWidth="14"
+        android:width="28dp"
+        xmlns:android="http://schemas.android.com/apk/res/android">
+    <path
+            android:fillAlpha="1"
+            android:fillColor="@color/orange500"
+            android:fillType="nonZero"
+            android:pathData="m11,7a4,4 0,1 1,-8 0,4 4,0 1,1 8,0z"
+            android:strokeColor="#00000000"
+            android:strokeWidth="1" />
+</vector>
diff --git a/application/vlc-android/res/layout-land/audio_player.xml b/application/vlc-android/res/layout-land/audio_player.xml
index bef36f083..187340d3e 100644
--- a/application/vlc-android/res/layout-land/audio_player.xml
+++ b/application/vlc-android/res/layout-land/audio_player.xml
@@ -320,7 +320,7 @@
                 android:paddingEnd="8dp"
                 android:progressDrawable="@drawable/po_seekbar"
                 android:splitTrack="false"
-                android:thumb="@drawable/ic_seekbar_thumb"
+                android:thumb="@drawable/ic_seekbar_thumb_audio"
                 app:layout_constraintStart_toStartOf="parent" />
 
         <TextView
diff --git a/application/vlc-android/res/layout/audio_player.xml b/application/vlc-android/res/layout/audio_player.xml
index 384561742..970f55cf0 100644
--- a/application/vlc-android/res/layout/audio_player.xml
+++ b/application/vlc-android/res/layout/audio_player.xml
@@ -327,7 +327,7 @@
                 android:padding="0dp"
                 android:progressDrawable="@drawable/po_seekbar"
                 android:splitTrack="false"
-                android:thumb="@drawable/ic_seekbar_thumb"
+                android:thumb="@drawable/ic_seekbar_thumb_audio"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
                 android:layout_marginBottom="8dp"



More information about the Android mailing list