Skip to content

Commit f53025c

Browse files
committed
add margin inbetween pages at the pdf viewer
1 parent db7d806 commit f53025c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ android {
6565

6666
dependencies {
6767
implementation 'com.github.SimpleMobileTools:Simple-Commons:b452494768'
68-
implementation 'com.github.tibbi:PdfViewPager:dd7da8173c'
68+
implementation 'com.github.tibbi:PdfViewPager:d2af24208d'
6969
implementation 'com.github.Stericson:RootTools:df729dcb13'
7070
implementation 'com.github.Stericson:RootShell:1.6'
7171
implementation 'com.alexvasilkov:gesture-views:2.5.2'

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/PDFViewerActivity.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import android.print.PrintManager
99
import android.view.View
1010
import android.view.WindowManager
1111
import androidx.constraintlayout.widget.ConstraintLayout
12+
import androidx.viewpager2.widget.MarginPageTransformer
1213
import androidx.viewpager2.widget.ViewPager2
1314
import androidx.viewpager2.widget.ViewPager2.OnPageChangeCallback
1415
import com.simplemobiletools.commons.extensions.*
@@ -110,6 +111,7 @@ class PDFViewerActivity : SimpleActivity() {
110111

111112
val errorHandler = PdfErrorHandler { throwable -> showErrorToast(throwable.toString()) }
112113

114+
pdf_viewer.setPageTransformer(MarginPageTransformer(resources.getDimension(R.dimen.activity_margin).toInt()))
113115
pdf_viewer.orientation = ViewPager2.ORIENTATION_VERTICAL
114116
pdf_viewer.adapter = PDFPagerAdapter(this, clickListener, errorHandler, uri.toString(), getProperBackgroundColor())
115117
pdf_viewer.registerOnPageChangeCallback(object : OnPageChangeCallback() {

0 commit comments

Comments
 (0)