[Android] Scrolling title & artist in audioplayer header

Geoffrey Métais git at videolan.org
Wed Jan 11 17:56:13 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jan 11 16:49:06 2017 +0100| [158e006c72f30918042b3728bebb4145dad6f501] | committer: Geoffrey Métais

Scrolling title & artist in audioplayer header

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

 vlc-android/res/layout/audio_media_switcher_item.xml               | 6 ++++--
 vlc-android/src/org/videolan/vlc/gui/view/HeaderMediaSwitcher.java | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/vlc-android/res/layout/audio_media_switcher_item.xml b/vlc-android/res/layout/audio_media_switcher_item.xml
index de947a3..14f5f7d 100644
--- a/vlc-android/res/layout/audio_media_switcher_item.xml
+++ b/vlc-android/res/layout/audio_media_switcher_item.xml
@@ -27,7 +27,8 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:singleLine="true"
-            android:ellipsize="middle"
+            android:ellipsize="marquee"
+            android:scrollHorizontally="true"
             android:text="@string/title"
             android:textColor="?attr/font_default"
             android:background="#00000000"
@@ -38,7 +39,8 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:singleLine="true"
-            android:ellipsize="middle"
+            android:ellipsize="marquee"
+            android:scrollHorizontally="true"
             android:text="@string/artist"
             android:textColor="?attr/font_light"
             android:background="#00000000"
diff --git a/vlc-android/src/org/videolan/vlc/gui/view/HeaderMediaSwitcher.java b/vlc-android/src/org/videolan/vlc/gui/view/HeaderMediaSwitcher.java
index ec9ef45..aa47d4e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/view/HeaderMediaSwitcher.java
+++ b/vlc-android/src/org/videolan/vlc/gui/view/HeaderMediaSwitcher.java
@@ -29,7 +29,6 @@ import android.widget.ImageView;
 import android.widget.TextView;
 
 import org.videolan.vlc.R;
-import org.videolan.vlc.gui.view.AudioMediaSwitcher;
 
 public class HeaderMediaSwitcher extends AudioMediaSwitcher {
 
@@ -51,6 +50,8 @@ public class HeaderMediaSwitcher extends AudioMediaSwitcher {
 
         titleView.setText(title);
         artistView.setText(artist);
+        titleView.setSelected(true);
+        artistView.setSelected(true);
 
         addView(v);
     }



More information about the Android mailing list