Hi, I'm trying to update my lib to the new version (RadaeePDF AndroidStudio 3.60.3) but the double tap event is not working. I removed the comments after "//remove comment mark to enable zoom when double tap.".
I tried to remove the comments in PDFSample code too, but it has the same behaviour. It looks like another page is getting the zoom,.After I double tap, I got another page selected with zoom.
Is there any workaround for it?
@Override
public boolean onDoubleTapEvent(MotionEvent e) {
if (m_status == STA_NONE && e.getActionMasked() == MotionEvent.ACTION_UP) {
final int x = (int)e.getX();
final int y = (int)e.getY();
final float z = m_layout.vGetZoom();
final GLLayout.PDFPos pos = m_layout.vGetPos(x, y);
queueEvent(new Runnable() {
@Override
public void run() {
m_layout.gl_zoom_start(m_gl10);
m_layout.gl_zoom_set(z * 1.2f);
m_layout.vSetPos(x, y, pos);
m_layout.gl_zoom_confirm(m_gl10);
requestRender();
}
});
//float x = e.getX();
//float y = e.getY();
int pageno = (m_layout != null) ? m_layout.vGetPage((int)x, (int)y) : -1;
if (m_listener == null || !m_listener.OnPDFDoubleTapped(pageno, x, y))
return false;
return true;
}
return false;
}
Tks,
Thiago