[Android] Fix cover scaletype for TV

Nicolas Pomepuy git at videolan.org
Thu Apr 11 18:38:09 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Mon Apr  8 14:44:05 2019 +0200| [ced825192e159b4c9d3c5558a65c6151888e6a8f] | committer: Geoffrey Métais

Fix cover scaletype for TV

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

 vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt b/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
index 3ca26e601..bc70d2822 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
@@ -195,7 +195,7 @@ fun updateImageView(bitmap: Bitmap?, target: View, vdb: ViewDataBinding?) {
         vdb.setVariable(BR.protocol, null)
     } else when (target) {
         is ImageView -> {
-            target.scaleType = ImageView.ScaleType.FIT_CENTER
+            target.scaleType = if (isForTV(vdb)) ImageView.ScaleType.CENTER_CROP else ImageView.ScaleType.FIT_CENTER
             target.setImageBitmap(bitmap)
             target.visibility = View.VISIBLE
         }



More information about the Android mailing list