From 9c9b6bc0d6f291d33a04334fd6b871684a50a2cb Mon Sep 17 00:00:00 2001 From: Mauricio Colli Date: Sat, 10 Mar 2018 13:36:50 -0300 Subject: [PATCH] Change thumbnail's scale strategy - Closes #1054 --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 3 --- app/src/main/res/layout/fragment_video_detail.xml | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index fc9a427eb..4d935dbce 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -1007,9 +1007,6 @@ public class VideoDetailFragment int height = isPortrait ? (int) (metrics.widthPixels / (16.0f / 9.0f)) : (int) (metrics.heightPixels / 2f); - thumbnailImageView.setScaleType(isPortrait - ? ImageView.ScaleType.CENTER_CROP - : ImageView.ScaleType.FIT_CENTER); thumbnailImageView.setLayoutParams( new FrameLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, height)); thumbnailImageView.setMinimumHeight(height); diff --git a/app/src/main/res/layout/fragment_video_detail.xml b/app/src/main/res/layout/fragment_video_detail.xml index cc14e1322..7c6568b67 100644 --- a/app/src/main/res/layout/fragment_video_detail.xml +++ b/app/src/main/res/layout/fragment_video_detail.xml @@ -37,7 +37,7 @@ android:layout_height="wrap_content" android:background="@android:color/transparent" android:contentDescription="@string/detail_thumbnail_view_description" - android:scaleType="centerCrop" + android:scaleType="fitCenter" tools:ignore="RtlHardcoded" tools:layout_height="200dp" tools:src="@drawable/dummy_thumbnail"/>