fixed buggy page transform in library

This commit is contained in:
Blatzar 2023-01-24 23:04:03 +01:00
parent 847c70a127
commit 4a0989c9c5

View file

@ -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