DImuthuUpe / AndroidPdfViewer

Android view for displaying PDFs rendered with PdfiumAndroid
Apache License 2.0
8.05k stars 1.85k forks source link

How to set max zoom, but not for double-click? #1154

Open pyroblinchik opened 1 year ago

pyroblinchik commented 1 year ago

I have a problem. I needed to increase the maxZoom value. And I did it (up to the 20x). The zoom really zooms in better now, but it does it strangely, when I spread my fingers, to increase the zoom, it works up to a maximum value of 10x. To further increase the zoom to the value that I specified in the variable maxZoom(20x), need to use double-click

Here is my code:

private val pdfContainer by lazy { binding.pdfView }

pdfContainer.maxZoom = 20f pdfContainer.fromUri(Uri.parse(attachment.url)) .enableSwipe(true) .swipeHorizontal(false) .enableDoubletap(true) .defaultPage(0) .enableAnnotationRendering(false) .fitEachPage(true) .password(null) .scrollHandle(null) .enableAntialiasing(true) .spacing(0) .pageFitPolicy(FitPolicy.WIDTH) .load()