Bug 30754 - TapGestureRecognizer recognizes false positives on Android
Summary: TapGestureRecognizer recognizes false positives on Android
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.2
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Chris King
URL:
Depends on:
Blocks:
 
Reported: 2015-06-03 17:05 UTC by Adam Kemp
Modified: 2015-07-20 13:43 UTC (History)
7 users (show)

Tags: AC
Is this bug a regression?: ---
Last known good build:


Attachments
Test project (178.59 KB, application/zip)
2015-06-03 17:05 UTC, Adam Kemp
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Adam Kemp 2015-06-03 17:05:19 UTC
Created attachment 11455 [details]
Test project

A "tap" is defined as a touch down followed by a touch up after a short delay with a minimum amount of movement between the two events. That means if you put your finger down and hold it there for a long time it should not be considered a tap. Likewise, if you put your finger down and drag it across the screen it should not be considered a tap.

Currently the Xamarin.Forms tap gesture recognizes any touch down followed by a touch up on the same view. This causes problems with native gestures in ancestor views because the tap gesture is incorrectly handling gestures it should instead reject.

On iOS the UITapGestureRecognizer, on which the Forms tap gesture recognizer is built, does properly reject these non-tap gestures.

To reproduce this just open the attached solution and run the UI tests. They both pass on iOS and both fail on Android.
Comment 1 Chris King 2015-06-05 16:58:24 UTC
We implement IOnClickListener which Android docs say is "Called when a view has been clicked"...
Comment 2 Adam Kemp 2015-06-05 17:21:50 UTC
A click is different from a tap. If you call it a tap gesture it should recognize a "tap", not a "click". A gesture detector can tell the difference. That might be a better implementation.
Comment 3 Chris King 2015-06-05 19:00:03 UTC
Indeed. A click is different from a tap and GestureDetector, amazingly enough, was the class that could tell the difference. Fix ready.

Warm regards,
Xamarin Forms Team
Comment 5 Adam Kemp 2015-06-16 16:54:11 UTC
Oh man, if only I could follow that link. ;)
Comment 6 Jason Smith [MSFT] 2015-06-26 03:28:57 UTC
Should be fixed in 1.4.4-pre1
Comment 7 Parmendra Kumar 2015-07-20 13:43:33 UTC
I have checked this issue with X.F 1.4.4-pre2 and its working fine at my end.

Screencast: http://www.screencast.com/t/gk8WCjPZ

Hence closing this issue.