1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-24 09:00:31 +00:00

Change thumbnail's scale strategy

- Closes #1054
This commit is contained in:
Mauricio Colli 2018-03-10 13:36:50 -03:00
parent 562f7e7e41
commit 9c9b6bc0d6
No known key found for this signature in database
GPG Key ID: F200BFD6F29DDD85
2 changed files with 1 additions and 4 deletions

View File

@ -1007,9 +1007,6 @@ public class VideoDetailFragment
int height = isPortrait int height = isPortrait
? (int) (metrics.widthPixels / (16.0f / 9.0f)) ? (int) (metrics.widthPixels / (16.0f / 9.0f))
: (int) (metrics.heightPixels / 2f); : (int) (metrics.heightPixels / 2f);
thumbnailImageView.setScaleType(isPortrait
? ImageView.ScaleType.CENTER_CROP
: ImageView.ScaleType.FIT_CENTER);
thumbnailImageView.setLayoutParams( thumbnailImageView.setLayoutParams(
new FrameLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, height)); new FrameLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, height));
thumbnailImageView.setMinimumHeight(height); thumbnailImageView.setMinimumHeight(height);

View File

@ -37,7 +37,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:contentDescription="@string/detail_thumbnail_view_description" android:contentDescription="@string/detail_thumbnail_view_description"
android:scaleType="centerCrop" android:scaleType="fitCenter"
tools:ignore="RtlHardcoded" tools:ignore="RtlHardcoded"
tools:layout_height="200dp" tools:layout_height="200dp"
tools:src="@drawable/dummy_thumbnail"/> tools:src="@drawable/dummy_thumbnail"/>