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

LongPressed Event doesn't fired

More
IP: 79.60.238.187 6 years 4 months ago #14511 by tommaso
Hi,
i've a problem with " OnPDFLongPressed(float x, float y) " event from Interface ILayoutView.PDFLayoutListener it seems doesn't work.

All other inteface's event works fine but longpress no, maybe there is a parameter or method to enable it.
Have any ideas or hint's
Thanks in advance
Tommaso Honorè
More
IP: 212.97.62.176 6 years 4 months ago #14512 by luca.f
Check if you're trying to intercept it in the correct implementation of the ILayoutView.PDFLayoutListener interface:
PDFViewAct or PDFGLViewAct, depending on you using CPU or OpenGL rendering mode.
Also, it's probably more handy to use the onLongPressed() callback in RadaeePDFManager, which is called anyway by both classes.
More
IP: 79.60.238.187 6 years 4 months ago #14513 by tommaso
Sorry I don't understand...
I use com.radaee.reader.PDFGLLayoutView
PDFOpen with parameter (document, callback)
callback -> com.radaee.view.ILayoutView.PDFLayoutListener
Call back interface contains
OnPDFDoubleTapped(float x, float y)
And
OnPDFLongPressed(float x, float y)

First method (OnPDFDoubleTapped) works fine
second method (OnPDFLongPressed) no

PDFGLViewAct what is it for?

Thanks in advance
Tommaso Honoré
More
IP: 212.97.62.176 6 years 4 months ago #14515 by luca.f
Dear user,
What class are you modifying?
Where are you trying to capture the longpress event?
More
IP: 79.60.238.187 6 years 4 months ago #14516 by tommaso
I try to intercept OnPDFLongPressed event
from com.radaee.view.ILayoutView.PDFLayoutListener interface. (without modify any class)
Simply doesn't fire onpdflongpressed event even if OnPDFDoubleTapped does
More
IP: 212.97.62.176 6 years 4 months ago #14517 by luca.f
Ok, i think i understood your issue
go in the onLongPress() method of GLView.java: it should be all commented-out if you're using the latest version.
Just add these 3 lines inside the method:
Code:
if (m_layout == null) return; if (m_status == STA_NONE && m_listener != null) m_listener.OnPDFLongPressed(e.getX(), e.getY());

Then the callback you're using should be enabled.
Let us know if it works for you.
Time to create page: 0.517 seconds
Powered by Kunena Forum