mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-05 01:26:23 +00:00
Improve code style
This commit is contained in:
parent
394eb92e71
commit
373ee53143
@ -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),
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user