[Android] Fix focus indicator in TV audio player API 22
Nicolas Pomepuy
git at videolan.org
Wed Feb 9 14:56:38 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Jan 17 09:43:30 2022 +0100| [5e695b24ffffe627259c2aba8bfa6c36d9ac7fc0] | committer: Nicolas Pomepuy
Fix focus indicator in TV audio player API 22
Fixes #2322
> https://code.videolan.org/videolan/vlc-android/commit/5e695b24ffffe627259c2aba8bfa6c36d9ac7fc0
---
.../main/res/color/player_circle_background_tv.xml | 7 -------
.../main/res/drawable/ic_circle_audio_player.xml | 22 +++++++---------------
.../drawable/ic_circle_audio_player_focused.xml | 15 +++++++++++++++
.../ic_circle_audio_player_not_focused.xml | 15 +++++++++++++++
4 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/application/resources/src/main/res/color/player_circle_background_tv.xml b/application/resources/src/main/res/color/player_circle_background_tv.xml
deleted file mode 100644
index 87a3f71a7..000000000
--- a/application/resources/src/main/res/color/player_circle_background_tv.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_focused="true" android:color="@color/white_transparent_20"/>
- <item android:state_selected="true" android:color="@color/white_transparent_20"/>
- <item android:state_pressed="true" android:color="@color/white_transparent_20"/>
- <item android:color="@color/transparent"/>
-</selector>
\ No newline at end of file
diff --git a/application/resources/src/main/res/drawable/ic_circle_audio_player.xml b/application/resources/src/main/res/drawable/ic_circle_audio_player.xml
index fb4f17999..27ad38a52 100644
--- a/application/resources/src/main/res/drawable/ic_circle_audio_player.xml
+++ b/application/resources/src/main/res/drawable/ic_circle_audio_player.xml
@@ -1,15 +1,7 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="48dp"
- android:height="48dp"
- android:viewportWidth="48"
- android:viewportHeight="48">
- <path
- android:pathData="M24,24m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"
- android:strokeAlpha="1"
- android:strokeLineJoin="round"
- android:strokeWidth="15.1181097"
- android:fillColor="@color/player_circle_background_tv"
- android:strokeColor="#00000000"
- android:fillType="nonZero"
- android:strokeLineCap="butt"/>
-</vector>
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true" android:drawable="@drawable/ic_circle_audio_player_focused"/>
+ <item android:state_selected="true" android:drawable="@drawable/ic_circle_audio_player_focused"/>
+ <item android:state_pressed="true" android:drawable="@drawable/ic_circle_audio_player_focused"/>
+ <item android:drawable="@drawable/ic_circle_audio_player_not_focused"/>
+</selector>
\ No newline at end of file
diff --git a/application/resources/src/main/res/drawable/ic_circle_audio_player_focused.xml b/application/resources/src/main/res/drawable/ic_circle_audio_player_focused.xml
new file mode 100644
index 000000000..9cd61bd6d
--- /dev/null
+++ b/application/resources/src/main/res/drawable/ic_circle_audio_player_focused.xml
@@ -0,0 +1,15 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="48dp"
+ android:height="48dp"
+ android:viewportWidth="48"
+ android:viewportHeight="48">
+ <path
+ android:pathData="M24,24m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"
+ android:strokeAlpha="1"
+ android:strokeLineJoin="round"
+ android:strokeWidth="15.1181097"
+ android:fillColor="@color/white_transparent_20"
+ android:strokeColor="#00000000"
+ android:fillType="nonZero"
+ android:strokeLineCap="butt"/>
+</vector>
diff --git a/application/resources/src/main/res/drawable/ic_circle_audio_player_not_focused.xml b/application/resources/src/main/res/drawable/ic_circle_audio_player_not_focused.xml
new file mode 100644
index 000000000..ff0755fa8
--- /dev/null
+++ b/application/resources/src/main/res/drawable/ic_circle_audio_player_not_focused.xml
@@ -0,0 +1,15 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="48dp"
+ android:height="48dp"
+ android:viewportWidth="48"
+ android:viewportHeight="48">
+ <path
+ android:pathData="M24,24m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"
+ android:strokeAlpha="1"
+ android:strokeLineJoin="round"
+ android:strokeWidth="15.1181097"
+ android:fillColor="@color/transparent"
+ android:strokeColor="#00000000"
+ android:fillType="nonZero"
+ android:strokeLineCap="butt"/>
+</vector>
More information about the Android
mailing list