Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8229 Reply

    Darek

    Hi, I need to add custom layer to the PDF. I use SimpleDocumentReader and adds layer with code listed below:

    It works but view is static it’s not responding for scroll and zoom gestures. I found setReaderListener (getReaderView().getPlugPDFDisplay().setReaderListener) which has onScroll and onChangeZoom events, but onScroll event has no parameters. Is there a way to listen for this event but with parameters?

    #8251 Reply

    Dr. Plug
    Moderator

    Hi Darek,

    Thank you very much for interest in PlugPDF. Do you mean is needs some parameter in the onScroll method?

    Unfortunately, now our SDK do not pass parameter in onScroll as known you already. But your idea is very nice. So, I will add and release with this feature in today. Please wait a little bit, I tell you after release as soon as possible.

    Thank you,
    Dr. Plug

    #8255 Reply

    Darek

    Thanks for answer. I need only x and y value of current page scroll position to set correct position of my custom layer.

    #8263 Reply

    Dr. Plug
    Moderator

    Hi Denis,

    Thanks for waiting. From now on, our SDK have changed as ‘onScroll(int distanceX, int distanceY)’. So please download updated PlugPDF SDK at http://plugpdf.com/sdkfile/PlugPDF_Android.zip.

    It parameter will receive moved distance.

    Best Regards,
    Dr. Plug

    #8265 Reply

    Darek

    Thanks a lot! Now it works.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: [Android] Add custom layer
Your information: