Double tap zoom show view where finger click - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: Double tap zoom show view where finger click

Double tap zoom show view where finger click 3 years 4 months ago #9127

  • abhilash_vijayakumar@yahoo.com
  • abhilash_vijayakumar@yahoo.com's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
I had customized to PDFLayoutView to have double tap to zoom. It is working but the pdf always move to the top left corner after zoom. how to zoom and show the pdf according to where the pdf user double tap?

below is my code :
// event when double tap occurs
        @Override
        public boolean onDoubleTap(MotionEvent e) {
            float x = e.getX();
            float y = e.getY();

            if (m_layout.vGetScale() <= 1.0){
                int vx = (int) x;
                int vy = (int) y;
                PDFLayout.PDFPos pos = m_layout.vGetPos(vx, vy);
                m_layout.vZoomSet(vx, vy, pos, 3.0f);
            } else {
                int vx = (int) x;
                int vy = (int) y;
                PDFLayout.PDFPos pos = m_layout.vGetPos(vx, vy);
                m_layout.vZoomSet(vx, vy, pos, 1.0f);
            }
            return true;
        }

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

Double tap zoom show view where finger click 3 years 4 months ago #9134

  • abhilash_vijayakumar@yahoo.com
  • abhilash_vijayakumar@yahoo.com's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Anyone can help me on this?

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

Double tap zoom show view where finger click 3 years 4 months ago #9163

  • dashti
  • dashti's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
As I checked in my own project, calling vZoomSet causes the reader jump to the corner of another page. The solution was to mimic smooth zoom action and call vZoomStart, vZoomSet and vZoomConfirmed with some delay. It seems the new LayoutView interface is so buggy with use of zoom action. Also in RDPDFReader demo, if you zoom in and try move the layout with your finger for some time, it jumps to the first page suddenly.

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

  • Page:
  • 1
Powered by Kunena Forum