I've added the PDF viewer to my app by copying code from ReaderActivity into my activity. The PDF is displaying, but it always displays with two pages side by side, and scrolls to additional pages horizontally. I want it to show one page at a time and scroll vertically.
I tried setting Global.def_view = 0 in my activity, after Global.Init(), and I also tried editing the Global class to change def_view directly there, but neither change has any effect on the display. I think I want view mode 0, which is the default anyway, but the viewer seems to be using view mode 1 or 6. What am I missing?
I'm able to change dark_mode in both places, so I don't know why I can't change def_view.
I think I figured out the problem here. I added code from ReaderActivity into my activity, and ReaderActivity creates an instance of ReaderController, which only creates an instance of PDFViewDual to render the PDF file.
I tried creating an instance of PDFReader instead of ReaderController, and that creates an instance of various kinds of PDFView classes depending on the def_view setting.
I thought def_view would take affect at any level of the library, but apparently it doesn't go that deep and I need to implement a wrapper class that uses it or implement that functionality myself.
Creating an instance of PDFReader in my activity seems like it will work. It has just taken a while to figure out what the difference is between all the files in the demo app and which ones I want to base my work on.