Bug 37877 - Disparity in button behavior
Summary: Disparity in button behavior
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-01-21 16:39 UTC by Cody Beyer (MSFT)
Modified: 2016-01-25 12:34 UTC (History)
5 users (show)

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

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:

Description Cody Beyer (MSFT) 2016-01-21 16:39:38 UTC
# Bug 

# Description

The following sample demonstrates an issue, where an invisible label will cause the button to not respond on iOS, but it does still respond on Android. There is a disparity in behavior between the two platforms

# Sample


# Steps to Reproduce

1. Download Sample
2. Deploy to iOS Simulator
3. Attempt to click red button
4. Stop execution
5. Deploy to Android Emulator
6. Attempt to click red button

# Expected Results

Steps 3 and 6 should yield the same results

# Actual Results

Step 3 does not increment the counter, Step 6 does

# Versions

=== Xamarin Studio ===

Version 5.10.2 (build 53)
Installation UUID: 2db5537f-b623-4d6b-85d5-fe6e23903af1
	Mono 4.2.2 (explicit/efae6a0)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402020029

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: (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.1.0
SDK Build Tools Version: 23.0.2

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)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 7f1cef9
Branch: master
Build date: 2016-01-15 19:47:34-0500

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 510020053
Git revision: 7ee6b4076e3f2907ae518876a91babcfdc2ea20e
Build date: 2016-01-15 11:54:57-05
Xamarin addins: 650d2ecb32cf74b3a4ac610d868925d5880f2967
Build lane: monodevelop-lion-cycle6-c6sr1

=== 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
	root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
Comment 1 Stephane Delcroix 2016-01-25 10:33:36 UTC
Note: This is not related to the invisible button label, but to the AbsoluteLayout used. We can have a responsive button on iOS without any label set in a StackLayout
Comment 2 Stephane Delcroix 2016-01-25 11:56:01 UTC
the label covers the button, that's why it's not responsive

	layout.Children.Add(label, new Rectangle(0, 0, screenWidth, 0.2f*screenHeight), AbsoluteLayoutFlags.None);
Comment 3 Stephen 2016-01-25 12:27:54 UTC
Hi Stephane, 

That was known from the start, the issue is that it behaves differently on Android from how it behaves on iOS. Should it not be responding on Android or should it also respond on iOS?

Best wishes,
Comment 4 Stephane Delcroix 2016-01-25 12:31:00 UTC
the Button behave exactly the same. the Label on top might not, but that's not the issue at hand, or I'm misreading this.
Comment 5 Stephen 2016-01-25 12:34:50 UTC
Yeah the issue is that the same scenario behaves differently depending on the operating system so if a cross platform app is created in Xamarin forms it will mean that it might work perfectly on Android but if there's label over a button the app won't work correctly on iOS