- Posts: 3
- 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
Double Tap - single tap event still fires?
IP: 192.168.0.70
12 years 8 months ago #3320
by adpward
Double Tap - single tap event still fires? was created by adpward
Hi,
I seem to have a bit of an issue with OnPDFDoubleTapped and OnPDFSingleTapped.
If I single tap, only OnPDFSingleTapped is invoked.
If I double tap, OnPDFSingleTapped is invoked followed by OnPDFDoubleTapped.
When I double tap, I only want OnPDFDoubleTapped to be invoked - can you please advice a way around this?
I seem to have a bit of an issue with OnPDFDoubleTapped and OnPDFSingleTapped.
If I single tap, only OnPDFSingleTapped is invoked.
If I double tap, OnPDFSingleTapped is invoked followed by OnPDFDoubleTapped.
When I double tap, I only want OnPDFDoubleTapped to be invoked - can you please advice a way around this?
IP: 192.168.0.70
12 years 8 months ago #3321
by radaee
Replied by radaee on topic Double Tap - single tap event still fires?
yes, gesture always fire single tap first.
IP: 192.168.0.70
12 years 8 months ago - 12 years 8 months ago #3324
by adpward
Replied by adpward on topic Double Tap - single tap event still fires?
Ok edited my response with more detail.
It's obvious that I use return True / False to get rid of the single press event.
My issue is this : -
My customer wants to single press to show / hide the buttons such that more of the view is available. So I've added some code to facilitate this.
I have added an event to the interface - OnDocumentClicked and fire it via m_listener.OnDocumentClicked().
What test can I perform in the single press event to prevent it from calling this method, because a double press is following?
It's obvious that I use return True / False to get rid of the single press event.
My issue is this : -
My customer wants to single press to show / hide the buttons such that more of the view is available. So I've added some code to facilitate this.
I have added an event to the interface - OnDocumentClicked and fire it via m_listener.OnDocumentClicked().
What test can I perform in the single press event to prevent it from calling this method, because a double press is following?
Last edit: 12 years 8 months ago by Peessewhogs.
IP: 192.168.0.70
12 years 8 months ago #3334
by adpward
Replied by adpward on topic Double Tap - single tap event still fires?
I have fixed this by adding a handler to the PDFReader class.
I invoke the handler with a postDelayed, using a 100ms delay, upon the OnPDFSingleTapped event firing. When the OnPDFDoubleTapped event fires, if a handler exists, it stops it using removeCallbacks.
Job done, looks great and is nice and responsive.
I invoke the handler with a postDelayed, using a 100ms delay, upon the OnPDFSingleTapped event firing. When the OnPDFDoubleTapped event fires, if a handler exists, it stops it using removeCallbacks.
Job done, looks great and is nice and responsive.
- Semenovich
- Offline
- New Member
-
Less
More
- Posts: 13
- Thank you received: 0
IP: 192.168.0.71
11 years 6 months ago #7291
by Semenovich
Replied by Semenovich on topic Double Tap - single tap event still fires?
Can you tell me the exact max delay between two taps that invokes OnPDFDoubleTapped? I need it to set the correct delay for handler.postDelayed() method.
Time to create page: 0.413 seconds