Bug 37389 - TapGestureRecognizer does not work on Entry controls on Android using Xamarin Forms
Summary: TapGestureRecognizer does not work on Entry controls on Android using Xamarin...
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-01-04 20:12 UTC by Roger Peters
Modified: 2017-06-01 19:45 UTC (History)
2 users (show)

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


Attachments
Sample project with TapGestureRecognizer and OnEntryTapped method (30.82 KB, application/zip)
2016-01-04 20:12 UTC, Roger Peters
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:
RESOLVED ANSWERED

Description Roger Peters 2016-01-04 20:12:03 UTC
Created attachment 14437 [details]
Sample project with TapGestureRecognizer and OnEntryTapped method

Adding a TapGestureRecognizer to an Entry control works fine on iOS, however it never fires on Android. My use case is wanting to show the user a full screen list view to pick a value from instead of using a smaller Picker. The interim solution has been to put a transparent BoxView over the Entry control and hooking up the TapGestureRecognizer on it instead, however this requires using OnPlatform hacks to not do this on iOS.

In the attached sample project the Entry field has IsEnabled set to false, however the gesture will not fire whether the field is enabled or not.
Comment 1 E.Z. Hart [MSFT] 2017-06-01 19:45:15 UTC
Roger,

That the tap gesture would fire on an Entry with `IsEnabled = false` was a bug in earlier versions of the iOS EntryRenderer; that bug has since been fixed. And a tap gesture will not fire on an Entry with `IsEnabled = true` because the tap focuses the control. This behavior is consistent on all of the platforms as of 2.3.5.239-pre3. 

I would suggest either using your transparent BoxView method to launch your picker on all platforms, or creating a custom renderer for Picker which displays a full-screen pick list.