Dmitry-Borodin / pdfview-android

Small Android library to show PDF files
Apache License 2.0
294 stars 48 forks source link

Doesn't work with ViewPager #42

Open navimakarov opened 3 years ago

navimakarov commented 3 years ago

When scrolling forward and then back, the screen becomes white and pdf is not seen

Dmitry-Borodin commented 3 years ago

Check lifecycle of your page fragment. Currently PdfView doesn't do SaveInstanceState so you have to do it manually in any of your fragments/screens. E.q. set Pdf file again after recreation. This is pending feature request that would be nice to implement, but I don't think I will have time for it in near future.

38

Restoring scrolled posittion is not implemented yet(another issue pending), but you can reopen the file if you can serialize data about it..

If you understand the question right - please close it as a duplicate.

pradeep-orbi commented 2 years ago

@navimakarov Did you find any solution for using PdfViewer in a ViewPager ?