forked from recloudstream/cloudstream
		
	fixed buggy page transform in library
This commit is contained in:
		
							parent
							
								
									847c70a127
								
							
						
					
					
						commit
						4a0989c9c5
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue