AndroidPdfViewer icon indicating copy to clipboard operation
AndroidPdfViewer copied to clipboard

Why does it not have .setSwipeHorizontal just like .setSnapPages and .setNightMode?

Open CosyLocales opened this issue 2 years ago • 4 comments

I want the pdfviewer to swipe horizontal on the click of a switch. That is the user can change the mode to either vertical or horizontal. I can't seem to find a way to set that without having to load the input stream code again. Is there a way to work it out?

code

CosyLocales avatar Dec 04 '22 09:12 CosyLocales

Not checked but i guess we can do it this way

if(sideways.ischecked()
{
pdfview.swipeHorizontal(true)
}
else
{
pdfview.swipeHorizontal(false)
}

ThreeMinutesFix avatar Dec 21 '22 15:12 ThreeMinutesFix

Not checked but i guess we can do it this way

if(sideways.ischecked()
{
pdfview.swipeHorizontal(true)
}
else
{
pdfview.swipeHorizontal(false)
}

Hi, there's no such option.

CosyLocales avatar Dec 29 '22 07:12 CosyLocales

in latest release this have pdfView.fromAsset(String) .pages(0, 2, 1, 3, 3, 3) // all pages are displayed by default .enableSwipe(true) // allows to block changing pages using swipe .swipeHorizontal(false) .enableDoubletap(true) .defaultPage(0)

ThreeMinutesFix avatar Dec 29 '22 16:12 ThreeMinutesFix

in latest release this have pdfView.fromAsset(String) .pages(0, 2, 1, 3, 3, 3) // all pages are displayed by default .enableSwipe(true) // allows to block changing pages using swipe .swipeHorizontal(false) .enableDoubletap(true) .defaultPage(0)

Yes, It has that which I have used for the first load. After the pdf loads, I want a switch button to trigger vertical and horizontal modes as indicated in the screenshot. That's where it gets tricky because there's no option for pdfview.swipeHorizontal. It seems that for me to use that option, I have to load the pdf from stream again. Please try it out and help me.

CosyLocales avatar Dec 29 '22 17:12 CosyLocales