diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java index de1359bca..6e2792d4f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java @@ -19,8 +19,10 @@ public abstract class PlayQueueItemTouchCallback extends ItemTouchHelper.SimpleC @Override public int interpolateOutOfBoundsScroll(@NonNull final RecyclerView recyclerView, - final int viewSize, final int viewSizeOutOfBounds, - final int totalSize, final long msSinceStartScroll) { + final int viewSize, + final int viewSizeOutOfBounds, + final int totalSize, + final long msSinceStartScroll) { final int standardSpeed = super.interpolateOutOfBoundsScroll(recyclerView, viewSize, viewSizeOutOfBounds, totalSize, msSinceStartScroll); final int clampedAbsVelocity = MathUtils.clamp(Math.abs(standardSpeed), diff --git a/app/src/main/java/org/schabi/newpipe/player/seekbarpreview/SeekbarPreviewThumbnailHelper.java b/app/src/main/java/org/schabi/newpipe/player/seekbarpreview/SeekbarPreviewThumbnailHelper.java index dba28a69a..43d89055c 100644 --- a/app/src/main/java/org/schabi/newpipe/player/seekbarpreview/SeekbarPreviewThumbnailHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/seekbarpreview/SeekbarPreviewThumbnailHelper.java @@ -80,10 +80,12 @@ public final class SeekbarPreviewThumbnailHelper { // Resize original bitmap try { final int srcWidth = srcBitmap.getWidth() > 0 ? srcBitmap.getWidth() : 1; - // Use 1/4 of the width for the preview - final int newWidth = MathUtils.clamp(Math.round(baseViewWidthSupplier.getAsInt() / 4f), + final int newWidth = MathUtils.clamp( + // Use 1/4 of the width for the preview + Math.round(baseViewWidthSupplier.getAsInt() / 4f), + // But have a min width of 10dp DeviceUtils.dpToPx(10, context), - // Scaling more than that factor looks really pixelated -> max + // And scaling more than that factor looks really pixelated -> max Math.round(srcWidth * 2.5f)); final float scaleFactor = (float) newWidth / srcWidth;