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

Reset zoom when page changed

More
10 years 8 months ago #9214 by petr.sklenicka
Hello,
I am using your library and I have a premium licence, so I have access to all classes. I have a little problem.
I need to reset zoom to default value in case that page is changed. For example, user is watching some page in magazine and this paged is zoomed. In case, that user goes to the next or previous page, I need to set the zoom to default value.

In PDFView class, I have implemented this method:
Code:
public void resetZoom() { if (m_scale > m_scale_min) { vSetScale(m_scale_min, 0, 0); } }

I have attached PDFViewListener in my Fragment. In case that OnPDFPageChanged(int pageno) is called, I call the resetZoom method on PDFView. It works fine, the zoom is set to m_scale_min value, but sometimes it causes jump to other page, because OnPDFChanged is called more than one. For example, I am at page number 5, the zoom is performed and when page is changes, I see for example page number 10, not 6.
Without calling resetZoom() in my fragment there is no "crazy" jumping, but zoom is not set to default value.

Can you give me please some advice how can I solve my problem?
Thanks a lot.
More
10 years 8 months ago - 10 years 8 months ago #9218 by support
The approach you're adopting [strike]is a[/strike] isn't a good one.
Try creating a trouble ticket so we can share some specific information with you.
Last edit: 10 years 8 months ago by support.
More
10 years 8 months ago #9224 by petr.sklenicka
Thank you for your answer. I created a ticket.
Time to create page: 0.380 seconds
Powered by Kunena Forum