- Posts: 16
- Thank you received: 0
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
IP: 79.60.238.187
6 years 4 months ago #14511
by tommaso
LongPressed Event doesn't fired was created 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è
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è
IP: 212.97.62.176
6 years 4 months ago #14512
by luca.f
Replied by luca.f on topic LongPressed Event doesn't fired
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.
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.
IP: 79.60.238.187
6 years 4 months ago #14513
by tommaso
Replied by tommaso on topic LongPressed Event doesn't fired
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é
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é
IP: 212.97.62.176
6 years 4 months ago #14515
by luca.f
Replied by luca.f on topic LongPressed Event doesn't fired
Dear user,
What class are you modifying?
Where are you trying to capture the longpress event?
What class are you modifying?
Where are you trying to capture the longpress event?
IP: 79.60.238.187
6 years 4 months ago #14516
by tommaso
Replied by tommaso on topic LongPressed Event doesn't fired
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
from com.radaee.view.ILayoutView.PDFLayoutListener interface. (without modify any class)
Simply doesn't fire onpdflongpressed event even if OnPDFDoubleTapped does
IP: 212.97.62.176
6 years 4 months ago #14517
by luca.f
Replied by luca.f on topic LongPressed Event doesn't fired
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:
Then the callback you're using should be enabled.
Let us know if it works for you.
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