[Android] Video card reorganisation

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


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Mon Jul 22 09:53:16 2019 +0200| [ee9aa4b10084d2c3fad4a86dc17af5a098ecf008] | committer: Geoffrey Métais

Video card reorganisation

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

 vlc-android/res/layout/video_grid_card.xml | 109 ++++++++++++++++-------------
 1 file changed, 61 insertions(+), 48 deletions(-)

diff --git a/vlc-android/res/layout/video_grid_card.xml b/vlc-android/res/layout/video_grid_card.xml
index 3dccadf08..008372017 100644
--- a/vlc-android/res/layout/video_grid_card.xml
+++ b/vlc-android/res/layout/video_grid_card.xml
@@ -96,60 +96,73 @@
             vlc:layout_constraintTop_toTopOf="@+id/ml_item_thumbnail" />
 
         <TextView
-            android:id="@+id/ml_item_title"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            vlc:layout_constraintStart_toStartOf="parent"
-            vlc:layout_constraintEnd_toStartOf="@+id/item_more"
-            vlc:layout_constraintBottom_toTopOf="@+id/ml_item_time"
-            android:layout_marginBottom="1dp"
-            style="@style/VLC.TextViewTitle"
-            android:textColor="@color/grey50"
-            android:layout_marginStart="@dimen/half_default_margin"
-            android:text="@{showFilename ? media.fileName : media.title}"
-            tools:targetApi="jelly_bean" />
+                android:id="@+id/ml_item_title"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                vlc:layout_constraintStart_toStartOf="parent"
+                vlc:layout_constraintEnd_toStartOf="@+id/item_more"
+                android:layout_marginBottom="8dp"
+                style="@style/VLC.TextViewTitle"
+                android:textColor="@color/grey50"
+                android:layout_marginStart="@dimen/half_default_margin"
+                android:text="@{showFilename ? media.fileName : media.title}"
+                tools:targetApi="jelly_bean"
+                vlc:layout_constraintBottom_toBottomOf="parent"
+                android:textSize="14sp"/>
 
         <TextView
-            android:id="@+id/ml_item_resolution"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            vlc:layout_constraintBottom_toTopOf="@+id/ml_item_progress"
-            vlc:layout_constraintEnd_toEndOf="@+id/item_more"
-            vlc:layout_constraintStart_toStartOf="@+id/item_more"
-            style="@style/VLC.TextViewDescription"
-            android:textColor="@color/grey50"
-            android:paddingStart="2dp"
-            android:paddingEnd="2dp"
-            android:layout_margin="4dp"
-            android:text="@{resolution}"
-            android:visibility="@{resolution == null ? View.GONE : View.VISIBLE, default=gone}"/>
+                android:id="@+id/ml_item_resolution"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                style="@style/VLC.TextViewDescription"
+                android:textColor="@color/grey50"
+                android:paddingTop="2dp"
+                android:paddingBottom="2dp"
+                android:paddingStart="4dp"
+                android:paddingEnd="4dp"
+                android:background="@drawable/rounded_corners"
+                android:text="@{resolution}"
+                android:visibility="@{resolution == null ? View.GONE : View.VISIBLE, default=gone}"
+                android:layout_marginTop="8dp"
+                vlc:layout_constraintTop_toTopOf="parent"
+                tools:visibility="visible"
+                tools:text="HD"
+                android:layout_marginEnd="8dp"
+                vlc:layout_constraintEnd_toEndOf="parent"
+                android:textSize="10sp"/>
 
         <TextView
-            android:id="@+id/ml_item_time"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            vlc:layout_constraintBottom_toTopOf="@+id/ml_item_progress"
-            vlc:layout_constraintEnd_toStartOf="@+id/ml_item_resolution"
-            vlc:layout_constraintStart_toStartOf="@+id/ml_item_title"
-            android:layout_marginBottom="2dp"
-            android:ellipsize="end"
-            android:gravity="start"
-            style="@style/VLC.TextViewDescription"
-            android:textColor="@color/grey50"
-            android:text="@{time}" />
+                android:id="@+id/ml_item_time"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:background="@drawable/rounded_corners"
+                vlc:layout_constraintStart_toStartOf="parent"
+                android:ellipsize="end"
+                android:gravity="start"
+                style="@style/VLC.TextViewDescription"
+                android:paddingTop="2dp"
+                android:paddingBottom="2dp"
+                android:paddingStart="4dp"
+                android:paddingEnd="4dp"
+                android:textColor="@color/grey50"
+                android:text="@{time}"
+                vlc:layout_constraintTop_toTopOf="parent"
+                android:layout_marginTop="8dp"
+                tools:text="32:55"
+                android:layout_marginStart="8dp"
+                android:textSize="10sp"/>
 
         <ImageView
-            android:id="@+id/item_more"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            vlc:layout_constraintBottom_toTopOf="@+id/ml_item_resolution"
-            vlc:layout_constraintEnd_toEndOf="parent"
-            android:layout_margin="4dp"
-            android:clickable="true"
-            android:contentDescription="@string/more_actions"
-            android:onClick="@{holder::onMoreClick}"
-            android:scaleType="fitEnd"
-            android:src="@drawable/ic_more_w" />
+                android:id="@+id/item_more"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                vlc:layout_constraintEnd_toEndOf="parent"
+                android:clickable="true"
+                android:contentDescription="@string/more_actions"
+                android:onClick="@{holder::onMoreClick}"
+                android:scaleType="fitEnd"
+                android:src="@drawable/ic_more_w"
+                vlc:layout_constraintBottom_toBottomOf="parent"/>
 
         <ProgressBar
             android:id="@+id/ml_item_progress"



More information about the Android mailing list