[Android] Add new video tips icon

Alexandre Perraud git at videolan.org
Tue Nov 2 13:00:50 UTC 2021


vlc-android | branch: master | Alexandre Perraud <alexandre at videolan.org> | Thu Sep 23 15:46:40 2021 +0200| [0260a683060e8baee7a26a7d0e9673260e2eb4e4] | committer: Nicolas Pomepuy

Add new video tips icon

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

 .../resources/assets/images/svg/ic_videotips.svg   | 63 ++++++++++++++++++++++
 .../src/main/res/drawable/ic_videotips.xml         |  9 ++--
 .../resources/src/main/res/values/attrs.xml        |  1 +
 application/vlc-android/res/values/styles.xml      |  4 ++
 .../vlc/gui/helpers/PlayerOptionsDelegate.kt       |  2 +-
 5 files changed, 73 insertions(+), 6 deletions(-)

diff --git a/application/resources/assets/images/svg/ic_videotips.svg b/application/resources/assets/images/svg/ic_videotips.svg
new file mode 100644
index 000000000..36727d8db
--- /dev/null
+++ b/application/resources/assets/images/svg/ic_videotips.svg
@@ -0,0 +1,63 @@
+<?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="48.0px"
+   height="48.0px"
+   viewBox="0 0 48.0 48.0"
+   version="1.1"
+   id="SVGRoot"
+   sodipodi:docname="ic_videotips.svg"
+   inkscape:version="1.0.2 (e86c870879, 2021-01-15)">
+  <defs
+     id="defs3204" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="7.9195959"
+     inkscape:cx="15.69018"
+     inkscape:cy="36.144539"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     inkscape:document-rotation="0"
+     showgrid="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1043"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3774" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3207">
+    <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></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <path
+       id="path3524-8"
+       style="fill:#000000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 36,1.9999352 -2,4 -4,2 4,2 2,3.9999998 2,-3.9999998 4,-2 -4,-2 z m -28,6 c -2.216,0 -4,1.784 -4,3.9999998 v 24 c 0,2.216 1.784,4 4,4 h 32 c 2.216,0 4,-1.784 4,-4 v -10 h -4 v 10 H 8 v -24 H 26 V 7.9999352 Z M 42,13.999935 40.666,16.665951 38,17.999935 40.666,19.333919 42,21.999935 43.334,19.333919 46,17.999935 43.334,16.665951 Z m -23.0215,2 c -0.5438,0.01175 -0.9786,0.456025 -0.9785,1 v 14 c 8e-4,0.789092 0.8948,1.263474 1.5371,0.84375 l 11,-7 c 0.6176,-0.392992 0.6176,-1.294508 0,-1.6875 l -11,-7 c -0.1667,-0.106122 -0.3611,-0.160492 -0.5586,-0.15625 z" />
+  </g>
+</svg>
diff --git a/application/resources/src/main/res/drawable/ic_videotips.xml b/application/resources/src/main/res/drawable/ic_videotips.xml
index 16d9498b5..91bd0d58f 100644
--- a/application/resources/src/main/res/drawable/ic_videotips.xml
+++ b/application/resources/src/main/res/drawable/ic_videotips.xml
@@ -1,14 +1,13 @@
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:width="48dp"
     android:height="48dp"
     android:viewportWidth="48"
     android:viewportHeight="48">
   <path
       android:pathData="m36,1.9999 l-2,4 -4,2 4,2 2,4 2,-4 4,-2 -4,-2zM8,7.9999c-2.216,0 -4,1.784 -4,4v24c0,2.216 1.784,4 4,4h32c2.216,0 4,-1.784 4,-4v-10h-4v10L8,35.9999v-24L26,11.9999L26,7.9999ZM42,13.9999 L40.666,16.666 38,17.9999 40.666,19.3339 42,21.9999 43.334,19.3339 46,17.9999 43.334,16.666ZM18.9785,15.9999c-0.5438,0.0117 -0.9786,0.456 -0.9785,1v14c0.0008,0.7891 0.8948,1.2635 1.5371,0.8438l11,-7c0.6176,-0.393 0.6176,-1.2945 0,-1.6875l-11,-7c-0.1667,-0.1061 -0.3611,-0.1605 -0.5586,-0.1563z"
-      android:strokeLineJoin="miter"
-      android:strokeWidth="1"
-      android:fillColor="#000000"
-      android:strokeColor="#00000000"
       android:fillType="evenOdd"
-      android:strokeLineCap="butt"/>
+      tools:fillColor="#ffffff"
+      android:fillColor="?attr/player_icon_color"/>
+
 </vector>
diff --git a/application/resources/src/main/res/values/attrs.xml b/application/resources/src/main/res/values/attrs.xml
index 222010e91..33afb628a 100644
--- a/application/resources/src/main/res/values/attrs.xml
+++ b/application/resources/src/main/res/values/attrs.xml
@@ -106,6 +106,7 @@
     <attr name="player_icon_color" format="reference" />
     <attr name="dialog_circle_background" format="reference"/>
     <attr name="ic_tips" format="reference"/>
+    <attr name="ic_videotips" format="reference"/>
     <attr name="ic_tips_double_tap" format="reference"/>
     <attr name="ic_tips_tap" format="reference"/>
 
diff --git a/application/vlc-android/res/values/styles.xml b/application/vlc-android/res/values/styles.xml
index 1935f9827..99d557124 100644
--- a/application/vlc-android/res/values/styles.xml
+++ b/application/vlc-android/res/values/styles.xml
@@ -87,6 +87,7 @@
         <item name="ic_speed_normal_style">@drawable/ic_speed</item>
         <item name="ic_sleep_normal_style">@drawable/ic_sleep</item>
         <item name="ic_tips">@drawable/ic_show_tips</item>
+        <item name="ic_videotips">@drawable/ic_videotips</item>
         <item name="ic_tips_double_tap">@drawable/tips_double_tap_500</item>
         <item name="ic_tips_tap">@drawable/tips_tap_500</item>
         <item name="ic_jumpto_normal_style">@drawable/ic_jumpto</item>
@@ -252,6 +253,7 @@
         <item name="ic_speed_normal_style">@drawable/ic_speed</item>
         <item name="ic_sleep_normal_style">@drawable/ic_sleep</item>
         <item name="ic_tips">@drawable/ic_show_tips_w</item>
+        <item name="ic_videotips">@drawable/ic_videotips</item>
         <item name="ic_tips_double_tap">@drawable/tips_double_tap</item>
         <item name="ic_tips_tap">@drawable/tips_tap</item>
         <item name="ic_jumpto_normal_style">@drawable/ic_jumpto</item>
@@ -320,6 +322,7 @@
         <item name="ic_speed_normal_style">@drawable/ic_speed</item>
         <item name="ic_sleep_normal_style">@drawable/ic_sleep</item>
         <item name="ic_tips">@drawable/ic_show_tips_w</item>
+        <item name="ic_videotips">@drawable/ic_videotips</item>
         <item name="ic_tips_double_tap">@drawable/tips_double_tap</item>
         <item name="ic_tips_tap">@drawable/tips_tap</item>
         <item name="ic_jumpto_normal_style">@drawable/ic_jumpto</item>
@@ -473,6 +476,7 @@
         <item name="ic_speed_normal_style">@drawable/ic_speed</item>
         <item name="ic_sleep_normal_style">@drawable/ic_sleep</item>
         <item name="ic_tips">@drawable/ic_show_tips_w</item>
+        <item name="ic_videotips">@drawable/ic_videotips</item>
         <item name="ic_tips_double_tap">@drawable/tips_double_tap</item>
         <item name="ic_tips_tap">@drawable/tips_tap</item>
         <item name="ic_jumpto_normal_style">@drawable/ic_jumpto</item>
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt
index 4ef8bb6cf..7c768ae32 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt
@@ -122,7 +122,7 @@ class PlayerOptionsDelegate(val activity: FragmentActivity, val service: Playbac
         if (!Settings.showTvUi) {
             if (video) {
             options.add(PlayerOption(ID_VIDEO_CONTROLS_SETTING, R.attr.ic_video_controls, res.getString(R.string.controls_setting)))
-                options.add(PlayerOption(ID_SHOW_VIDEO_TIPS, R.attr.ic_tips, res.getString(R.string.tips_title)))
+            options.add(PlayerOption(ID_SHOW_VIDEO_TIPS, R.attr.ic_videotips, res.getString(R.string.tips_title)))
             } else {
             options.add(PlayerOption(ID_AUDIO_CONTROLS_SETTING, R.attr.ic_audio_controls, res.getString(R.string.controls_setting)))
                 options.add(PlayerOption(ID_SHOW_AUDIO_TIPS, R.attr.ic_tips, res.getString(R.string.audio_player_tips)))



More information about the Android mailing list