[Android] Add scaled "Shuffle All" icon to maintain uniform icon sizing between playable and browseable menu items

Robert Stone git at videolan.org
Tue Oct 20 14:30:37 CEST 2020


vlc-android | branch: master | Robert Stone <rhstone at gmail.com> | Thu Oct 15 23:39:25 2020 -0700| [d847892070f1336127396ac31ca32fb8e29c16db] | committer: Jean-Baptiste Kempf

Add scaled "Shuffle All" icon to maintain uniform icon sizing between playable and browseable menu items

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

 .../assets/images/svg/ic_auto_shuffle_all.svg      | 80 ++++++++++++++++++++++
 .../src/main/res/drawable/ic_auto_shuffle_all.xml  | 35 ++++++++++
 .../org/videolan/vlc/media/MediaSessionBrowser.kt  |  2 +-
 3 files changed, 116 insertions(+), 1 deletion(-)

diff --git a/application/resources/assets/images/svg/ic_auto_shuffle_all.svg b/application/resources/assets/images/svg/ic_auto_shuffle_all.svg
new file mode 100644
index 0000000000..d4ef65718e
--- /dev/null
+++ b/application/resources/assets/images/svg/ic_auto_shuffle_all.svg
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="24"
+   height="24"
+   id="svg4682"
+   version="1.1"
+   inkscape:version="1.0.1 (c497b03c, 2020-09-10)"
+   sodipodi:docname="ic_auto_shuffle_all.svg"
+   inkscape:export-filename="/home/corbax/Dev/android/Icons/Test 1/ic_play_normal.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4684" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.958333"
+     inkscape:cx="10.44204"
+     inkscape:cy="11.777434"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:window-width="1440"
+     inkscape:window-height="855"
+     inkscape:window-x="0"
+     inkscape:window-y="23"
+     inkscape:window-maximized="0"
+     inkscape:snap-global="true"
+     inkscape:snap-bbox="true"
+     inkscape:bbox-paths="true"
+     inkscape:bbox-nodes="true"
+     inkscape:snap-bbox-edge-midpoints="true"
+     inkscape:snap-bbox-midpoints="true"
+     inkscape:snap-nodes="true"
+     inkscape:object-paths="true"
+     inkscape:object-nodes="true"
+     inkscape:snap-smooth-nodes="true"
+     inkscape:snap-midpoints="true"
+     inkscape:snap-object-midpoints="true"
+     inkscape:snap-center="true"
+     inkscape:document-rotation="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2983" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4687">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1028.3622)">
+    <path
+       inkscape:connector-curvature="0"
+       id="path7632"
+       d="M 5.898439,1035.3622 5,1036.2418 l 3.2226889,3.221 0.8984291,-0.8795 z m 5.976561,0 1.113306,1.1115 -7.6367449,7.6386 L 5,1044.4628 5.878939,1045.3622 6.25,1044.9917 13.867195,1037.3532 15,1038.4904 v -3.1282 z m -0.09779,5.8796 -0.89845,0.8795 2.128889,2.1096 -1.132812,1.1313 h 3.124999 v -3.1217 l -1.113272,1.1109 z"
+       style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#757575;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.312501;marker:none;enable-background:accumulate" />
+  </g>
+</svg>
diff --git a/application/resources/src/main/res/drawable/ic_auto_shuffle_all.xml b/application/resources/src/main/res/drawable/ic_auto_shuffle_all.xml
new file mode 100644
index 0000000000..0d36058b0d
--- /dev/null
+++ b/application/resources/src/main/res/drawable/ic_auto_shuffle_all.xml
@@ -0,0 +1,35 @@
+<!--
+  ~ *************************************************************************
+  ~  ic_auto_shuffle_all.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="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:pathData="M5.8984,7 L5,7.8796l3.2227,3.221 0.8984,-0.8795zM11.875,7 L12.9883,8.1115 5.3516,15.75L5,16.1006 5.8789,17 6.25,16.6295 13.8672,8.991 15,10.1282v-3.1282zM11.7772,12.8796 L10.8788,13.7592 13.0076,15.8688 11.8748,17.0001h3.125v-3.1217l-1.1133,1.1109z"
+      android:strokeWidth="0.312501"
+      android:fillColor="#757575"
+      android:strokeColor="#00000000"
+      android:fillType="nonZero"/>
+</vector>
diff --git a/application/vlc-android/src/org/videolan/vlc/media/MediaSessionBrowser.kt b/application/vlc-android/src/org/videolan/vlc/media/MediaSessionBrowser.kt
index 7feaa49190..aeaf8d2686 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/MediaSessionBrowser.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/MediaSessionBrowser.kt
@@ -185,7 +185,7 @@ class MediaSessionBrowser : ExtensionManagerActivity {
                         item = MediaDescriptionCompat.Builder()
                                 .setMediaId(ID_SHUFFLE_ALL)
                                 .setTitle(res.getString(R.string.shuffle_all_title))
-                                .setIconUri("${BASE_DRAWABLE_URI}/${R.drawable.ic_auto_audio_normal}".toUri())
+                                .setIconUri("${BASE_DRAWABLE_URI}/${R.drawable.ic_auto_shuffle_all}".toUri())
                         results.add(MediaBrowserCompat.MediaItem(item.build(), MediaBrowserCompat.MediaItem.FLAG_PLAYABLE))
                         //Last added
                         item = MediaDescriptionCompat.Builder()



More information about the Android mailing list