[Android] Ensure to have correct params for ellipsizes

Geoffrey Métais git at videolan.org
Thu Oct 5 16:50:34 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Oct  5 16:11:15 2017 +0200| [1ea2a204b18bba821e932e3ae8d600e479840045] | committer: Geoffrey Métais

Ensure to have correct params for ellipsizes

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

 vlc-android/res/layout/dialog_select_chapter_item.xml | 1 +
 vlc-android/res/layout/extension_item_view.xml        | 2 ++
 vlc-android/res/layout/info_item.xml                  | 4 +++-
 vlc-android/res/layout/mrl_item.xml                   | 1 +
 vlc-android/res/layout/playlist_item.xml              | 2 ++
 vlc-android/res/layout/video_grid_card.xml            | 3 +--
 vlc-android/res/layout/video_list_card.xml            | 1 +
 vlc-android/res/layout/widget_b.xml                   | 2 ++
 vlc-android/res/layout/widget_w.xml                   | 2 ++
 9 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/vlc-android/res/layout/dialog_select_chapter_item.xml b/vlc-android/res/layout/dialog_select_chapter_item.xml
index d831b92c7..87cb3de11 100644
--- a/vlc-android/res/layout/dialog_select_chapter_item.xml
+++ b/vlc-android/res/layout/dialog_select_chapter_item.xml
@@ -13,6 +13,7 @@
         android:ellipsize="marquee"
         android:padding="@dimen/half_default_margin"
         android:singleLine="true"
+        android:maxLines="1"
         android:text="Chapter_name" />
 
     <TextView
diff --git a/vlc-android/res/layout/extension_item_view.xml b/vlc-android/res/layout/extension_item_view.xml
index 350700149..484e3ccc3 100644
--- a/vlc-android/res/layout/extension_item_view.xml
+++ b/vlc-android/res/layout/extension_item_view.xml
@@ -50,6 +50,7 @@
             android:ellipsize="marquee"
             android:marqueeRepeatLimit="marquee_forever"
             android:singleLine="true"
+            android:maxLines="1"
             vlc:layout_constraintEnd_toStartOf="@+id/item_more"
             vlc:layout_constraintStart_toEndOf="@id/extension_image"
             vlc:layout_constraintTop_toTopOf="parent"
@@ -67,6 +68,7 @@
             android:fontFamily="sans-serif-light"
             android:textColor="?attr/list_subtitle"
             android:ellipsize="marquee"
+            android:singleLine="true"
             android:maxLines="1"
             android:layout_marginTop="2dp"
             vlc:layout_constraintEnd_toStartOf="@id/item_more"
diff --git a/vlc-android/res/layout/info_item.xml b/vlc-android/res/layout/info_item.xml
index 55ed35ab9..dbf510882 100644
--- a/vlc-android/res/layout/info_item.xml
+++ b/vlc-android/res/layout/info_item.xml
@@ -38,7 +38,9 @@
             android:layout_marginRight="@dimen/half_default_margin"
             android:fontFamily="sans-serif-light"
             android:textColor="?attr/list_subtitle"
-            android:ellipsize="start" />
+            android:ellipsize="start"
+            android:singleLine="true"
+            android:maxLines="1" />
     </LinearLayout>
 
 </LinearLayout>
\ No newline at end of file
diff --git a/vlc-android/res/layout/mrl_item.xml b/vlc-android/res/layout/mrl_item.xml
index 2418d3da5..98e66b743 100644
--- a/vlc-android/res/layout/mrl_item.xml
+++ b/vlc-android/res/layout/mrl_item.xml
@@ -26,6 +26,7 @@
         android:ellipsize="middle"
         android:gravity="center_vertical"
         android:maxLines="1"
+        android:singleLine="true"
         android:fontFamily="sans-serif-light"
         android:textColor="?attr/font_default"/>
 </LinearLayout>
\ No newline at end of file
diff --git a/vlc-android/res/layout/playlist_item.xml b/vlc-android/res/layout/playlist_item.xml
index b6eefaef2..ea6e180a4 100644
--- a/vlc-android/res/layout/playlist_item.xml
+++ b/vlc-android/res/layout/playlist_item.xml
@@ -46,6 +46,7 @@
                 android:layout_marginRight="5dip"
                 android:singleLine="true"
                 android:ellipsize="middle"
+                android:maxLines="1"
                 android:text="@{media.title}"
                 android:textColor="@{titleColor}"
                 android:textSize="16sp" />
@@ -58,6 +59,7 @@
                 android:layout_marginRight="5dip"
                 android:singleLine="true"
                 android:ellipsize="middle"
+                android:maxLines="1"
                 android:textColor="?attr/list_subtitle"
                 android:fontFamily="sans-serif-light"
                 android:textSize="12sp"
diff --git a/vlc-android/res/layout/video_grid_card.xml b/vlc-android/res/layout/video_grid_card.xml
index 44b801308..07e45827c 100644
--- a/vlc-android/res/layout/video_grid_card.xml
+++ b/vlc-android/res/layout/video_grid_card.xml
@@ -93,7 +93,6 @@
             vlc:layout_constraintStart_toStartOf="parent"
             vlc:layout_constraintEnd_toStartOf="@+id/item_more"
             vlc:layout_constraintBottom_toTopOf="@+id/ml_item_time"
-            android:ellipsize="end"
             android:fontFamily="sans-serif"
             android:maxLines="2"
             android:paddingLeft="@dimen/very_small_margin"
@@ -114,7 +113,7 @@
             android:gravity="start"
             android:paddingLeft="@dimen/half_default_margin"
             android:paddingStart="@dimen/half_default_margin"
-            android:singleLine="true"
+            android:maxLines="1"
             android:text="@{time}"
             android:textColor="@color/grey50"
             android:textSize="@dimen/grid_card_subtitle_text_size"
diff --git a/vlc-android/res/layout/video_list_card.xml b/vlc-android/res/layout/video_list_card.xml
index b14ab25e3..be512e9a4 100644
--- a/vlc-android/res/layout/video_list_card.xml
+++ b/vlc-android/res/layout/video_list_card.xml
@@ -90,6 +90,7 @@
             android:fontFamily="sans-serif-light"
             android:gravity="center_vertical"
             android:maxLines="2"
+            android:singleLine="true"
             android:paddingLeft="@dimen/half_default_margin"
             android:paddingStart="@dimen/half_default_margin"
             android:text="@{media.title}"
diff --git a/vlc-android/res/layout/widget_b.xml b/vlc-android/res/layout/widget_b.xml
index 557cacb20..f43fdac0c 100644
--- a/vlc-android/res/layout/widget_b.xml
+++ b/vlc-android/res/layout/widget_b.xml
@@ -36,6 +36,7 @@
                 android:layout_marginLeft="@dimen/half_default_margin"
                 android:ellipsize="end"
                 android:singleLine="true"
+                android:maxLines="1"
                 android:textColor="@color/grey500"
                 android:textSize="14sp" />
 
@@ -47,6 +48,7 @@
                 android:layout_marginLeft="@dimen/half_default_margin"
                 android:ellipsize="end"
                 android:singleLine="true"
+                android:maxLines="1"
                 android:text="@string/widget_default_text"
                 android:textColor="@color/grey50"
                 android:textSize="16sp" />
diff --git a/vlc-android/res/layout/widget_w.xml b/vlc-android/res/layout/widget_w.xml
index e88d01fff..f3463cb2c 100644
--- a/vlc-android/res/layout/widget_w.xml
+++ b/vlc-android/res/layout/widget_w.xml
@@ -35,6 +35,7 @@
                 android:layout_gravity="center|left"
                 android:layout_marginLeft="@dimen/half_default_margin"
                 android:ellipsize="end"
+                android:maxLines="1"
                 android:singleLine="true"
                 android:textColor="@color/grey600"
                 android:textSize="14sp" />
@@ -46,6 +47,7 @@
                 android:layout_gravity="center|left"
                 android:layout_marginLeft="@dimen/half_default_margin"
                 android:ellipsize="end"
+                android:maxLines="1"
                 android:singleLine="true"
                 android:text="@string/widget_default_text"
                 android:textColor="@color/grey900"



More information about the Android mailing list