[Android] Widgets: prevent multi line track / artist texts and ellipsize them

Nicolas Pomepuy git at videolan.org
Wed May 18 09:57:58 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed May 11 12:17:09 2022 +0200| [ed956bec1803507d769ca90ac98fa257770c843d] | committer: Duncan McNamara

Widgets: prevent multi line track / artist texts and ellipsize them

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

 application/vlc-android/res/layout/widget_macro.xml | 4 ++++
 application/vlc-android/res/layout/widget_mini.xml  | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/application/vlc-android/res/layout/widget_macro.xml b/application/vlc-android/res/layout/widget_macro.xml
index c0716c5bc..e1d86a973 100644
--- a/application/vlc-android/res/layout/widget_macro.xml
+++ b/application/vlc-android/res/layout/widget_macro.xml
@@ -93,6 +93,8 @@
                 android:id="@+id/songName"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
+                android:maxLines="1"
+                android:ellipsize="end"
                 android:paddingStart="8dp"
                 android:paddingTop="4dp"
                 android:paddingEnd="8dp"
@@ -103,6 +105,8 @@
                 android:id="@+id/artist"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
+                android:maxLines="1"
+                android:ellipsize="end"
                 android:paddingStart="8dp"
                 android:paddingEnd="8dp"
                 android:layout_marginBottom="4dp"
diff --git a/application/vlc-android/res/layout/widget_mini.xml b/application/vlc-android/res/layout/widget_mini.xml
index e9c65a695..a6c0a15ac 100644
--- a/application/vlc-android/res/layout/widget_mini.xml
+++ b/application/vlc-android/res/layout/widget_mini.xml
@@ -87,6 +87,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:maxLines="1"
+                    android:ellipsize="end"
                     android:textColor="@color/white"
                     android:textSize="16sp"
                     tools:text="Track" />
@@ -95,6 +96,7 @@
                     android:id="@+id/artist"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
+                    android:ellipsize="end"
                     android:maxLines="1"
                     android:textColor="@color/white"
                     tools:text="Author" />



More information about the Android mailing list