[Android] Set proper image size on thumbnailer refresh

Geoffrey Métais git at videolan.org
Thu Mar 26 17:10:16 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar 26 17:09:29 2015 +0100| [8a6df1dddff40de3b3a5ef0b9dd9c4f36cdfde54] | committer: Geoffrey Métais

Set proper image size on thumbnailer refresh

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=8a6df1dddff40de3b3a5ef0b9dd9c4f36cdfde54
---

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

diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/CardPresenter.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/CardPresenter.java
index c1031e2..6913160 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/CardPresenter.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/CardPresenter.java
@@ -76,13 +76,15 @@ public class CardPresenter extends Presenter {
                 if (picture == null) {
                     mCardView.getMainImageView().setScaleType(ImageView.ScaleType.CENTER);
                     picture = BitmapFactory.decodeResource(mRes, R.drawable.ic_browser_audio_big_normal);
-                }
+                } else
+                    mCardView.getMainImageView().setScaleType(ImageView.ScaleType.FIT_XY);
             } else if (MediaWrapper.getType() == MediaWrapper.TYPE_VIDEO) {
                 picture = sMediaDatabase.getPicture(sContext, MediaWrapper.getLocation());
                 if (picture == null){
                     mCardView.getMainImageView().setScaleType(ImageView.ScaleType.CENTER);
                     picture = BitmapFactory.decodeResource(mRes, R.drawable.ic_browser_video_big_normal);
-                }
+                } else
+                    mCardView.getMainImageView().setScaleType(ImageView.ScaleType.FIT_XY);
             } else if (MediaWrapper.getType() == MediaWrapper.TYPE_DIR) {
                 mCardView.getMainImageView().setScaleType(ImageView.ScaleType.CENTER);
                 picture = BitmapFactory.decodeResource(mRes, R.drawable.ic_menu_network_big);



More information about the Android mailing list