From 4a0989c9c5bf1f59d34de1b46083a5d03d42c057 Mon Sep 17 00:00:00 2001 From: Blatzar <46196380+Blatzar@users.noreply.github.com> Date: Tue, 24 Jan 2023 23:04:03 +0100 Subject: [PATCH] fixed buggy page transform in library --- .../cloudstream3/ui/library/LibraryScrollTransformer.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/library/LibraryScrollTransformer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/library/LibraryScrollTransformer.kt index b954cc26..8aafbdd6 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/library/LibraryScrollTransformer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/library/LibraryScrollTransformer.kt @@ -3,10 +3,11 @@ package com.lagradost.cloudstream3.ui.library import android.view.View import androidx.viewpager2.widget.ViewPager2 import kotlinx.android.synthetic.main.library_viewpager_page.view.* +import kotlin.math.roundToInt class LibraryScrollTransformer : ViewPager2.PageTransformer { override fun transformPage(page: View, position: Float) { - val padding = (-position * page.width).toInt() + val padding = (-position * page.width).roundToInt() page.page_recyclerview.setPadding( padding, 0, -padding, 0