LongPressed Event doesn't fired - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC: LongPressed Event doesn't fired

LongPressed Event doesn't fired 1 week 6 days ago #14511

  • tommaso
  • tommaso's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0
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è

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

LongPressed Event doesn't fired 1 week 6 days ago #14512

  • luca.f
  • luca.f's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 23
  • Thank you received: 1
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.

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

LongPressed Event doesn't fired 1 week 6 days ago #14513

  • tommaso
  • tommaso's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0
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é

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

LongPressed Event doesn't fired 1 week 5 days ago #14515

  • luca.f
  • luca.f's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 23
  • Thank you received: 1
Dear user,
What class are you modifying?
Where are you trying to capture the longpress event?

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

LongPressed Event doesn't fired 1 week 5 days ago #14516

  • tommaso
  • tommaso's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0
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

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

LongPressed Event doesn't fired 1 week 5 days ago #14517

  • luca.f
  • luca.f's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 23
  • Thank you received: 1
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:
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.
The following user(s) said Thank You: tommaso

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum