[Android] Fix play button not visible on "unknown" cards

Nicolas Pomepuy git at videolan.org
Thu Apr 16 15:43:44 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Apr  9 11:45:32 2020 +0200| [f5571d85b8854de82c9416968fa64b0e3dfa0a01] | committer: Nicolas Pomepuy

Fix play button not visible on "unknown" cards

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

 .../assets/images/svg/ic_play_circle_card.svg      | 14 ++++-----
 .../src/main/res/drawable/ic_play_circle_card.xml  | 35 +++++++++++-----------
 .../res/layout/audio_browser_card_item.xml         | 11 +++++++
 application/vlc-android/res/values/styles.xml      |  2 ++
 4 files changed, 38 insertions(+), 24 deletions(-)

diff --git a/application/resources/assets/images/svg/ic_play_circle_card.svg b/application/resources/assets/images/svg/ic_play_circle_card.svg
index b808afcb6..f7fc0c0c9 100644
--- a/application/resources/assets/images/svg/ic_play_circle_card.svg
+++ b/application/resources/assets/images/svg/ic_play_circle_card.svg
@@ -5,14 +5,14 @@
         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="svg3428" version="1.1" inkscape:version="0.92.3 (unknown)"
-        sodipodi:docname="ic_play_circle_card_normal.svg">
+        id="svg3428" version="1.1" inkscape:version="0.92.3 (2405546, 2018-03-11)"
+        sodipodi:docname="ic_play_circle_card.svg">
     <defs id="defs3430" />
     <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0"
-            inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6568545"
-            inkscape:cx="17.664479" inkscape:cy="54.886489" inkscape:document-units="px"
-            inkscape:current-layer="g4951" showgrid="true" inkscape:window-width="1920"
-            inkscape:window-height="1043" inkscape:window-x="1920" inkscape:window-y="0"
+            inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="32.000001"
+            inkscape:cx="29.260974" inkscape:cy="14.828545" inkscape:document-units="px"
+            inkscape:current-layer="g4951" showgrid="true" inkscape:window-width="2560"
+            inkscape:window-height="1413" inkscape:window-x="0" inkscape:window-y="27"
             inkscape:window-maximized="1" inkscape:snap-bbox="true" inkscape:bbox-paths="true"
             inkscape:bbox-nodes="true" inkscape:snap-bbox-midpoints="true"
             inkscape:snap-bbox-edge-midpoints="true" inkscape:snap-nodes="true"
@@ -36,7 +36,7 @@
             transform="translate(0,-1028.3622)">
         <g id="g4951" transform="translate(-3.0000002,1.999999)">
             <ellipse transform="scale(-1)"
-                    style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#f5f5f5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.1;marker:none;enable-background:accumulate"
+                    style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#f5f5f5;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.1;marker:none;enable-background:accumulate;stroke-opacity:1"
                     id="ellipse1744" cx="-15" cy="-1038.3622" rx="8" ry="8.000001"
                     inkscape:export-xdpi="89" inkscape:export-ydpi="89" />
             <path sodipodi:type="star"
diff --git a/application/resources/src/main/res/drawable/ic_play_circle_card.xml b/application/resources/src/main/res/drawable/ic_play_circle_card.xml
index 2bd371fc8..a38cb5369 100644
--- a/application/resources/src/main/res/drawable/ic_play_circle_card.xml
+++ b/application/resources/src/main/res/drawable/ic_play_circle_card.xml
@@ -27,21 +27,22 @@
         android:height="48dp"
         android:viewportWidth="24"
         android:viewportHeight="24">
-    <path
-            android:fillAlpha="1"
-            android:fillColor="@color/standard_selection"
-            android:fillType="nonZero"
-            android:pathData="M20,12a8,8 90,1 0,-16 -0a8,8 90,1 0,16 -0z"
-            android:strokeWidth="0.1"
-            android:strokeColor="#00000000" />
-    <path
-            android:fillAlpha="1"
-            android:fillColor="#444d51"
-            android:fillType="nonZero"
-            android:pathData="m16.0023,12 l-6.0045,3.4979 0,-6.9958z"
-            android:strokeWidth="0.86090249"
-            android:strokeAlpha="1"
-            android:strokeColor="#444d51"
-            android:strokeLineCap="round"
-            android:strokeLineJoin="round" />
+  <path
+          android:pathData="M20,12a8,8 90,1 0,-16 -0a8,8 90,1 0,16 -0z"
+          android:strokeAlpha="1"
+          android:strokeWidth="0.1"
+          android:fillColor="@color/standard_selection"
+          android:strokeColor="?attr/colorControlNormal"
+          android:fillType="nonZero"
+          android:fillAlpha="1" />
+  <path
+          android:pathData="m16.0023,12 l-6.0045,3.4979 0,-6.9958z"
+          android:strokeAlpha="1"
+          android:strokeLineJoin="round"
+          android:strokeWidth="0.86090249"
+          android:fillColor="@color/grey700"
+          android:strokeColor="@color/grey700"
+          android:fillType="nonZero"
+          android:fillAlpha="1"
+          android:strokeLineCap="round" />
 </vector>
diff --git a/application/vlc-android/res/layout/audio_browser_card_item.xml b/application/vlc-android/res/layout/audio_browser_card_item.xml
index 17b823456..dee7f7bf9 100644
--- a/application/vlc-android/res/layout/audio_browser_card_item.xml
+++ b/application/vlc-android/res/layout/audio_browser_card_item.xml
@@ -74,6 +74,7 @@
                     android:src="@{cover}"
                     android:visibility="@{(item.getItemType() & (MediaLibraryItem.TYPE_ALBUM|MediaLibraryItem.TYPE_ARTIST|MediaLibraryItem.TYPE_MEDIA|MediaLibraryItem.TYPE_PLAYLIST)) != 0 ? View.VISIBLE : View.GONE, default=gone}"
                     tools:srcCompat="@tools:sample/avatars"
+                    tools:visibility="visible"
                     vlc:card="@{true}"
                     vlc:imageWidth="@{imageWidth}"
                     vlc:layout_constraintDimensionRatio="1"
@@ -82,6 +83,16 @@
                     vlc:layout_constraintTop_toTopOf="parent"
                     vlc:media="@{item}" />
 
+            <View
+                    android:id="@+id/view3"
+                    android:layout_width="0dp"
+                    android:layout_height="1dp"
+                    android:background="?attr/card_border"
+                    vlc:layout_constraintEnd_toEndOf="parent"
+                    vlc:layout_constraintHorizontal_bias="0.0"
+                    vlc:layout_constraintStart_toStartOf="parent"
+                    vlc:layout_constraintTop_toBottomOf="@+id/media_cover" />
+
             <ImageView
                     android:id="@+id/selector_image"
                     android:layout_width="0dp"
diff --git a/application/vlc-android/res/values/styles.xml b/application/vlc-android/res/values/styles.xml
index 7203a29b8..f61dd7a39 100644
--- a/application/vlc-android/res/values/styles.xml
+++ b/application/vlc-android/res/values/styles.xml
@@ -35,6 +35,7 @@
         <item name="android:colorControlHighlight" tools:targetApi="lollipop">@color/orange500
         </item>
         <item name="colorControlHighlight">@color/orange500</item>
+        <item name="colorControlNormal">@color/grey700</item>
 
 
         <item name="actionModeBackground">@color/grey400</item>
@@ -158,6 +159,7 @@
         <item name="android:colorControlHighlight" tools:targetApi="lollipop">@color/orange500
         </item>
         <item name="colorControlHighlight">@color/orange500</item>
+        <item name="colorControlNormal">@color/grey700</item>
 
         <item name="item_footer">@color/grey700</item>
         <item name="windowActionModeOverlay">true</item>



More information about the Android mailing list