[Android] Use vector drawables for API >= 21

Robert Stone git at videolan.org
Fri Feb 17 12:27:06 UTC 2023


vlc-android | branch: master | Robert Stone <rhstone at gmail.com> | Tue Feb 14 19:55:00 2023 -0800| [76c8781f58bccfa8d68bbc5f9f92ad39bbd4438e] | committer: Nicolas Pomepuy

Use vector drawables for API >= 21

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

 .../src/main/res/drawable-anydpi-v21/ic_notif_audio.xml      | 12 ++++++++++++
 .../src/main/res/drawable-anydpi-v21/ic_notif_scan.xml       |  9 +++++++++
 .../src/main/res/drawable-anydpi-v21/ic_notif_video.xml      |  9 +++++++++
 3 files changed, 30 insertions(+)

diff --git a/application/resources/src/main/res/drawable-anydpi-v21/ic_notif_audio.xml b/application/resources/src/main/res/drawable-anydpi-v21/ic_notif_audio.xml
new file mode 100644
index 0000000000..d9a470fdde
--- /dev/null
+++ b/application/resources/src/main/res/drawable-anydpi-v21/ic_notif_audio.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:pathData="m10.367,4c-0.19,0 -0.403,0.023 -0.555,0.137 -0.301,0.225 -0.422,0.586 -0.684,1.367 -0.262,0.781 -0.273,0.82 -0.273,0.82 1.094,0.547 1.888,0.598 3.021,0 0,0 -0.013,-0.043 -0.273,-0.82 -0.261,-0.778 -0.381,-1.137 -0.684,-1.367 -0.151,-0.115 -0.363,-0.137 -0.553,-0.137zM16,4 L16,14.176a3,3 0,0 0,-1 -0.176,3 3,0 0,0 -3,3 3,3 0,0 0,3 3,3 3,0 0,0 3,-3l0,-10 3,0 0,-3 -3,0 -2,0zM7.898,9.195 L6.805,12.479 6.803,12.489c0.005,-0.001 0.009,0 0.014,0 1.254,1.087 2.864,1.502 4.396,1.26a5,5 0,0 1,2.607 -1.592l-0.984,-2.953 -0.002,0c-1.659,1.239 -3.294,1.229 -4.936,0zM5.104,14.119c-0.364,0 -0.702,0.274 -0.809,0.637L3.658,16.924c-0.208,0.711 -0.414,1.416 -0.623,2.131 -0.087,0.299 -0.001,0.52 0.141,0.672 0.087,0.094 0.196,0.162 0.295,0.207 0.099,0.044 0.168,0.066 0.246,0.066 0.183,0 3.372,0 6.65,0 0.314,0 0.327,0 0.637,0a5,5 0,0 1,-0.994 -2.703c-1.55,-0.07 -3.053,-0.589 -4.016,-1.531 -0.206,-0.202 -0.137,-0.41 0,-0.82 0.091,-0.273 0.264,-0.824 0.264,-0.824l-1.154,0z"
+      android:strokeWidth="1"
+      android:fillColor="#ffffff"
+      android:strokeColor="#00000000"
+      android:fillType="nonZero"/>
+</vector>
diff --git a/application/resources/src/main/res/drawable-anydpi-v21/ic_notif_scan.xml b/application/resources/src/main/res/drawable-anydpi-v21/ic_notif_scan.xml
new file mode 100644
index 0000000000..6ddc09c114
--- /dev/null
+++ b/application/resources/src/main/res/drawable-anydpi-v21/ic_notif_scan.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:pathData="m10.367,4c-0.19,0 -0.403,0.023 -0.555,0.137 -0.301,0.225 -0.422,0.586 -0.684,1.367 -0.262,0.781 -0.273,0.82 -0.273,0.82 1.094,0.547 1.888,0.598 3.021,0 0,0 -0.013,-0.043 -0.273,-0.82 -0.261,-0.778 -0.381,-1.137 -0.684,-1.367 -0.151,-0.115 -0.363,-0.137 -0.553,-0.137zM7.898,9.195 L6.805,12.479 6.803,12.489c0.005,-0.001 0.009,0 0.014,0 1.021,0.885 2.279,1.328 3.539,1.332a7,7 0,0 1,2.801 -3.656l-0.32,-0.961 -0.002,0c-1.659,1.239 -3.294,1.229 -4.936,0zM17,11a5,5 0,0 0,-5 5,5 5,0 0,0 5,5 5,5 0,0 0,4.895 -4l-1.541,0a3.5,3.5 0,0 1,-3.354 2.5,3.5 3.5,0 0,1 -3.5,-3.5 3.5,3.5 0,0 1,3.5 -3.5,3.5 3.5,0 0,1 2.473,1.027L18,15l2.352,0 1.547,0 0.102,0 0,-4 -1.467,1.467A5,5 0,0 0,17 11ZM5.104,14.119c-0.364,0 -0.702,0.274 -0.809,0.637l-0.637,2.168c-0.208,0.711 -0.414,1.416 -0.623,2.131 -0.087,0.299 -0.001,0.52 0.141,0.672 0.087,0.094 0.196,0.162 0.295,0.207 0.099,0.044 0.168,0.066 0.246,0.066 0.183,0 3.372,0 6.65,0 0.442,0 0.465,-0 0.896,0a7,7 0,0 1,-1.139 -2.703c-1.59,-0.049 
 -3.144,-0.566 -4.131,-1.531 -0.206,-0.202 -0.137,-0.41 0,-0.82 0.091,-0.273 0.264,-0.824 0.264,-0.824l-1.154,0z"
+      android:fillColor="#ffffff"/>
+</vector>
diff --git a/application/resources/src/main/res/drawable-anydpi-v21/ic_notif_video.xml b/application/resources/src/main/res/drawable-anydpi-v21/ic_notif_video.xml
new file mode 100644
index 0000000000..3c72c362cc
--- /dev/null
+++ b/application/resources/src/main/res/drawable-anydpi-v21/ic_notif_video.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:pathData="m10.367,4.002c-0.19,0 -0.403,0.023 -0.555,0.137 -0.301,0.225 -0.422,0.586 -0.684,1.367 -0.262,0.781 -0.273,0.82 -0.273,0.82 0.791,0.395 1.426,0.526 2.145,0.346l0,-2.451c-0.027,-0.026 -0.049,-0.059 -0.08,-0.082 -0.151,-0.115 -0.363,-0.137 -0.553,-0.137zM13,4.002 L13,9.689 13,13.121 13,16.846 13,20 13,20 17.016,20 18.5,20 18.5,18 20.5,18 20.5,20 22,20 22,4 20.5,4 20.5,6 18.5,6 18.5,4 13,4zM18.5,7.502 L20.5,7.502 20.5,9.502 18.5,9.502 18.5,7.502zM7.898,9.197 L6.805,12.48 6.803,12.49c0.005,-0.001 0.009,0 0.014,0 1.196,1.037 2.716,1.45 4.184,1.277l0,-3.697c-1.036,0.2 -2.068,-0.09 -3.102,-0.865zM18.5,11.002l2,0 0,2 -2,0 0,-2zM5.104,14.121c-0.364,0 -0.702,0.274 -0.809,0.637l-0.637,2.168c-0.208,0.711 -0.414,1.416 -0.623,2.131 -0.087,0.299 -0.001,0.52 0.141,0.672 0.087,0.094 0.196,0.162 0.295,0.207 0.099,0.044 0.168,0.066 0.246,0.066 0.183,0 3.372,0 6.65,0 0.312,0 0.325,0 0.633,0l0,-2.734c-0.106,0.01 -0.21,0.031 -0.316,0.035 -1.777,0.068 -3.588,-0.457 -4.689,-1.535 -0
 .206,-0.202 -0.137,-0.41 0,-0.82 0.091,-0.273 0.264,-0.824 0.264,-0.824l-1.154,0zM18.5,14.502l2,0 0,2 -2,0 0,-2z"
+      android:fillColor="#ffffff"/>
+</vector>



More information about the Android mailing list