[Android] TV: Fix icons display

Geoffrey Métais git at videolan.org
Wed Apr 18 18:03:36 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 18 17:16:36 2018 +0200| [19f81da1d640035bc620073a8ac7f401879720c1] | committer: Geoffrey Métais

TV: Fix icons display

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

 vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java b/vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java
index fd0b26a9c..ca1a82291 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java
@@ -45,6 +45,7 @@ import org.videolan.vlc.R;
 import org.videolan.vlc.VLCApplication;
 import org.videolan.vlc.gui.helpers.AudioUtil;
 import org.videolan.vlc.gui.helpers.ImageLoaderKt;
+import org.videolan.vlc.media.MediaGroup;
 import org.videolan.vlc.util.Constants;
 
 import java.util.List;
@@ -80,7 +81,7 @@ public class CardPresenter extends Presenter {
         }
 
         void updateCardViewImage(MediaLibraryItem item) {
-            if (TextUtils.isEmpty(item.getArtworkMrl()) && item.getItemType() != MediaLibraryItem.TYPE_MEDIA) {
+            if (TextUtils.isEmpty(item.getArtworkMrl()) && !(item instanceof MediaGroup)) {
                 mCardView.getMainImageView().setScaleType(ImageView.ScaleType.FIT_CENTER);
                 mCardView.setMainImage(new BitmapDrawable(mCardView.getResources(), getDefaultImage(item)));
             } else ImageLoaderKt.loadImage(mCardView, item);



More information about the Android mailing list