[Android] Improve video cards time / resolution background color

Nicolas Pomepuy git at videolan.org
Wed Jul 24 15:18:19 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Mon Jul 22 13:11:06 2019 +0200| [6df607424352bedd912b73543aa218f93ef59438] | committer: Geoffrey Métais

Improve video cards time / resolution background color

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

 .../res/drawable/rounded_corners_black_more_transparent.xml    | 10 ++++++++++
 vlc-android/res/layout/video_grid_card.xml                     |  9 +++++----
 vlc-android/res/values/colors.xml                              |  1 +
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/vlc-android/res/drawable/rounded_corners_black_more_transparent.xml b/vlc-android/res/drawable/rounded_corners_black_more_transparent.xml
new file mode 100644
index 000000000..b1998af57
--- /dev/null
+++ b/vlc-android/res/drawable/rounded_corners_black_more_transparent.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:shape="rectangle">
+    <solid android:color="@color/black_more_transparent">
+    </solid>
+    <corners android:radius="5dp">
+    </corners>
+
+</shape>
\ No newline at end of file
diff --git a/vlc-android/res/layout/video_grid_card.xml b/vlc-android/res/layout/video_grid_card.xml
index 008372017..abdfbadfb 100644
--- a/vlc-android/res/layout/video_grid_card.xml
+++ b/vlc-android/res/layout/video_grid_card.xml
@@ -104,11 +104,12 @@
                 android:layout_marginBottom="8dp"
                 style="@style/VLC.TextViewTitle"
                 android:textColor="@color/grey50"
-                android:layout_marginStart="@dimen/half_default_margin"
+                android:layout_marginStart="8dp"
                 android:text="@{showFilename ? media.fileName : media.title}"
                 tools:targetApi="jelly_bean"
                 vlc:layout_constraintBottom_toBottomOf="parent"
-                android:textSize="14sp"/>
+                android:textSize="14sp"
+                tools:text="Star wars Episode 1"/>
 
         <TextView
                 android:id="@+id/ml_item_resolution"
@@ -120,7 +121,7 @@
                 android:paddingBottom="2dp"
                 android:paddingStart="4dp"
                 android:paddingEnd="4dp"
-                android:background="@drawable/rounded_corners"
+                android:background="@drawable/rounded_corners_black_more_transparent"
                 android:text="@{resolution}"
                 android:visibility="@{resolution == null ? View.GONE : View.VISIBLE, default=gone}"
                 android:layout_marginTop="8dp"
@@ -135,7 +136,7 @@
                 android:id="@+id/ml_item_time"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:background="@drawable/rounded_corners"
+                android:background="@drawable/rounded_corners_black_more_transparent"
                 vlc:layout_constraintStart_toStartOf="parent"
                 android:ellipsize="end"
                 android:gravity="start"
diff --git a/vlc-android/res/values/colors.xml b/vlc-android/res/values/colors.xml
index a14564eaa..8dca83f3b 100644
--- a/vlc-android/res/values/colors.xml
+++ b/vlc-android/res/values/colors.xml
@@ -39,6 +39,7 @@
     <color name="grey900">#212121</color>
 
     <color name="playerbackground">#c0141414</color>
+    <color name="black_more_transparent">#88000000</color>
 
     <color name="grey50transparent">#b9fafafa</color>
     <color name="grey50transparent_ea">#eafafafa</color>



More information about the Android mailing list