Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 15477 [details]
The following sample has a TapGestureRecognizer attached to each label, however tapping the label does not fire the event. Only if you tap a very specific part of the label, does the event fire.
# Steps to Reproduce
1. Download sample
2. Deploy to Android
3. Attempt to tap “Info Plus”
# Expected Results
Message box should appear stating that the tap has occurred
# Actual Results
Noting happens, unless you hit right above the “i” of “info”
=== Xamarin Studio ===
Version 6.0 (build 4801)
Installation UUID: c6c42496-bf80-4551-9cf0-689c3378c0c4
Mono 4.4.0 (mono-4.4.0-branch/f8474c4) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 404000040
=== Xamarin.Profiler ===
=== Apple Developer Tools ===
Xcode 7.2.1 (9548.1)
=== Xamarin.iOS ===
Version: 18.104.22.168 (Business Edition)
Build date: 2016-03-03 09:05:19-0500
=== Xamarin.Android ===
Version: 22.214.171.124 (Business Edition)
Android SDK: /Users/codybeyer/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.0.3 (API level 15)
4.4 (API level 19)
6.0 (API level 23)
SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Android Designer EPL code available here:
=== Xamarin Android Player ===
Location: /Applications/Xamarin Android Player.app
=== Xamarin.Mac ===
Version: 126.96.36.199 (Business Edition)
=== Build Information ===
Release ID: 600004801
Git revision: f73f730c738baf8701a5892b7af64fd468d1dc0c
Build date: 2016-03-14 14:28:06-04
Xamarin addins: 3af7be6c701eb0137645a03e38b82f23b65738c3
Build lane: monodevelop-lion-cycle7
=== Operating System ===
Mac OS X 10.11.3
Darwin Codys-Mac.local 15.3.0 Darwin Kernel Version 15.3.0
Thu Dec 10 18:40:58 PST 2015
Not sure if this issue exists in AppCompat.
In your repro project, StartPage.cs, comment out line 81 and it'll work as expected.
Here's what's happening:
You've marked the StackLayout VerticalOptions with EndAndExpand, but you've also set its height to 35. The StackLayout can't actually expand to encompass the Label, so the Label effectively ends up being laid out mostly outside of the StackLayout (it's hanging out of the bottom; to see this better, set the background of the Layout to one color and the background of the Label to another).
On iOS and Android, hit testing starts at the top level of the control hierarchy and works its way down (giving the container controls the option to intercept touches before their children handle them). So the touches on the parts of the Label outside of the StackLayout are in a weird place outside the hierarchy and effectively don't register at all. That's why at the very top of the Label (the part still inside the StackLayout) the tap gesture works.
Windows doesn't have this issue because it handles touch event processing differently.