- Posts: 5
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
zoom, PDFSetPos & pages
IP: 192.168.0.71
8 years 10 months ago #12374
by davred
zoom, PDFSetPos & pages was created by davred
I opened a document with
next I zoom in with
now, with OnTouch event I want to "move" inside the document:
I'm able to moving inside the document but if I go to right the reader show me the next page.
Is there a method to block the view only to the current page?
Code:
PDFOpen(m_doc, this)
Code:
PDFZoom(..)
Code:
....
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
pp = pdfView.PDFGetPos((int) event.getX(), (int) event.getY());
break;
case MotionEvent.ACTION_MOVE:
pdfView.PDFSetPos(pp, (int) event.getX(), (int) event.getY());
break;
}
.......
I'm able to moving inside the document but if I go to right the reader show me the next page.
Is there a method to block the view only to the current page?
IP: 192.168.0.71
8 years 10 months ago #12377
by nermeen
Replied by nermeen on topic zoom, PDFSetPos & pages
You can check the below articles, one for the PDFLayoutDual and one for the deprecated PDFViewDual
IP: 192.168.0.71
8 years 10 months ago #12378
by davred
Replied by davred on topic zoom, PDFSetPos & pages
Thank you.
But to use ExtendedDualLayout i need to Override PDFSetView.
What is the best way to mantain unthached the libray?
To Override the method I need that some var are declared protected and not private
But to use ExtendedDualLayout i need to Override PDFSetView.
What is the best way to mantain unthached the libray?
To Override the method I need that some var are declared protected and not private
IP: 192.168.0.71
8 years 10 months ago - 8 years 10 months ago #12379
by nermeen
Replied by nermeen on topic zoom, PDFSetPos & pages
You can create a class that extends PDFLayoutView and overrides PDFSetView
For the private variables, you can override the methods that set these variables to save an instance of their values, or you can use your own values based on the variables and your requirements.
For the private variables, you can override the methods that set these variables to save an instance of their values, or you can use your own values based on the variables and your requirements.
Last edit: 8 years 10 months ago by nermeen.
IP: 192.168.0.71
8 years 10 months ago #12380
by davred
Replied by davred on topic zoom, PDFSetPos & pages
If i override PDFSetView i need access to
But for the others vars?
- m_rtol
- m_goto_pos
- m_bmp_format
- m_doc
But for the others vars?
IP: 192.168.0.71
8 years 10 months ago #12381
by nermeen
Replied by nermeen on topic zoom, PDFSetPos & pages
The same idea:
- m_rtol -> currently it's always false, from the next version it will be moved to Globlal class, so you can set it based on your configuration parameter
- m_goto_pos -> override PDFGotoPage to save an instance
- m_bmp_format -> override PDFSetBmpFormat
Time to create page: 0.412 seconds