[Android] Fix artist display in audio player header
Geoffrey Métais
git at videolan.org
Thu Feb 16 10:50:43 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 16 10:48:42 2017 +0100| [0957f28016da8e557818b7fb7acb877514c0def4] | committer: Geoffrey Métais
Fix artist display in audio player header
> https://code.videolan.org/videolan/vlc-android/commit/0957f28016da8e557818b7fb7acb877514c0def4
---
vlc-android/res/layout/audio_media_switcher_item.xml | 1 -
vlc-android/src/org/videolan/vlc/gui/view/HeaderMediaSwitcher.java | 7 +++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/vlc-android/res/layout/audio_media_switcher_item.xml b/vlc-android/res/layout/audio_media_switcher_item.xml
index 4b12189..f88bc87 100644
--- a/vlc-android/res/layout/audio_media_switcher_item.xml
+++ b/vlc-android/res/layout/audio_media_switcher_item.xml
@@ -44,7 +44,6 @@
android:singleLine="true"
android:ellipsize="marquee"
android:scrollHorizontally="true"
- android:text="@string/artist"
android:textColor="?attr/font_light"
android:background="#00000000"
android:textSize="14sp"
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 2164f91..134915e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/view/HeaderMediaSwitcher.java
+++ b/vlc-android/src/org/videolan/vlc/gui/view/HeaderMediaSwitcher.java
@@ -51,11 +51,10 @@ public class HeaderMediaSwitcher extends AudioMediaSwitcher {
titleView.setText(title);
titleView.setSelected(true);
- boolean hasArtist = TextUtils.isEmpty(artist);
- if (hasArtist)
- artistView.setText(artist);
+ boolean hasArtist = !TextUtils.isEmpty(artist);
+ artistView.setText(artist);
artistView.setSelected(hasArtist);
- artistView.setVisibility(hasArtist ? GONE : VISIBLE);
+ artistView.setVisibility(hasArtist ? VISIBLE : GONE);
addView(v);
}
More information about the Android
mailing list