[Android] TV: Lazy-load video thumbnails

Geoffrey Métais git at videolan.org
Wed Apr 4 18:35:51 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Mar 23 17:45:29 2018 +0100| [f25b1a6510f5278dc660403f99732f01028e7ee8] | committer: Geoffrey Métais

TV: Lazy-load video thumbnails

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

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

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 9e39dc0ab..bd7efecf4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java
@@ -76,12 +76,10 @@ public class CardPresenter extends Presenter {
         }
 
         void updateCardViewImage(MediaLibraryItem mediaLibraryItem) {
-            if (!TextUtils.isEmpty(mediaLibraryItem.getArtworkMrl()))
-                AsyncImageLoader.loadPicture(mCardView, mediaLibraryItem);
-            else {
+            if (mediaLibraryItem.getItemType() == MediaLibraryItem.TYPE_DUMMY) {
                 mCardView.getMainImageView().setScaleType(ImageView.ScaleType.FIT_CENTER);
                 mCardView.setMainImage(new BitmapDrawable(mCardView.getResources(), getDefaultImage(mediaLibraryItem)));
-            }
+            } else AsyncImageLoader.loadPicture(mCardView, mediaLibraryItem);
         }
 
         private Bitmap getDefaultImage(MediaLibraryItem mediaLibraryItem) {



More information about the Android mailing list