Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Reset zoom when page changed 9 years 9 months ago #9214

  • petr.sklenicka
  • petr.sklenicka's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 36
  • Thank you received: 0
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:
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.

Please Log in or Create an account to join the conversation.

Reset zoom when page changed 9 years 9 months ago #9218

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 695
  • Thank you received: 59
The approach you're adopting is a isn't a good one.
Try creating a trouble ticket so we can share some specific information with you.

Please Log in or Create an account to join the conversation.

Last edit: by support.

Reset zoom when page changed 9 years 9 months ago #9224

  • petr.sklenicka
  • petr.sklenicka's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 36
  • Thank you received: 0
Thank you for your answer. I created a ticket.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum