use proper viewpager background color

This commit is contained in:
tibbi
2022-12-10 20:12:22 +01:00
parent 12aae27ccd
commit a84ccc2e23
2 changed files with 3 additions and 5 deletions

View File

@ -65,7 +65,7 @@ android {
dependencies { dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:b452494768' implementation 'com.github.SimpleMobileTools:Simple-Commons:b452494768'
implementation 'com.github.tibbi:PdfViewPager:6f9641fd2c' implementation 'com.github.tibbi:PdfViewPager:dd7da8173c'
implementation 'com.github.Stericson:RootTools:df729dcb13' implementation 'com.github.Stericson:RootTools:df729dcb13'
implementation 'com.github.Stericson:RootShell:1.6' implementation 'com.github.Stericson:RootShell:1.6'
implementation 'com.alexvasilkov:gesture-views:2.5.2' implementation 'com.alexvasilkov:gesture-views:2.5.2'

View File

@ -95,16 +95,14 @@ class PDFViewerActivity : SimpleActivity() {
return return
} }
pdf_viewer.orientation = ViewPager2.ORIENTATION_VERTICAL
pdf_viewer.setBackgroundColor(getProperBackgroundColor())
val clickListener = View.OnClickListener { val clickListener = View.OnClickListener {
toggleFullScreen() toggleFullScreen()
} }
val errorHandler = PdfErrorHandler { throwable -> showErrorToast(throwable.toString()) } val errorHandler = PdfErrorHandler { throwable -> showErrorToast(throwable.toString()) }
pdf_viewer.adapter = PDFPagerAdapter(this, clickListener, errorHandler, uri.toString()) pdf_viewer.orientation = ViewPager2.ORIENTATION_VERTICAL
pdf_viewer.adapter = PDFPagerAdapter(this, clickListener, errorHandler, uri.toString(), getProperBackgroundColor())
showSystemUI(true) showSystemUI(true)