-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Platform (please complete the following information):
-
OS: [iOS/Android/Both]
Both iOS and Android, physical devices or simulator/emulator. -
Device: [iPhone6/iPhoneSimulator/Pixel/AndroidEmulator/...]
Tested on physical iPhone X running iOS 13.2
Tested on multiple iOS simulators running iOS 13.2 and 12.2
Tested on physical LG V20 running Android 8.0.0 (api 26)
Tested on Android emulator running Android 8.1.0 (api 27)
Tested on Android emulator running Android 9.0 (api 28) -
Sdk vervion: [iOS 11/Android SDK 21]
SDK versions listed above, along with each device. -
Xamarin.Forms: [3.4.0.1029999]
Using the SillyCompany.Mobile.Practices sample app, which currently is on XF 4.2.0.815419.
Also tested upgrading to the latest Xamarin.Forms (currently 4.3.0.947036), and the behavior was the same.
Describe the bug
First, thank you so much for this awesome library, sample code, and super helpful blog posts. Sharpnado is allowing me to create the exact look and feel I was hoping for!
It appears there is no 'Clicked' event on the TabButton, and I wanted to run a small animation when the button was tapped. I added a TapGestureRecognizer to the TabButton, and tried to animate the button when tapped. However, the button itself does not seem to register the taps... Only the area of the TabButton that is not the button, but rather the background, responds to taps.
I also wired up the TapCommand to an ICommand in my view model, and it responds to taps of the button area itself, but not the background, which is perfect. I would have expected the TapGestureRecognizer to cover the whole control.
To Reproduce
Steps to reproduce the behavior:
NOTE: Screenshots of code changes made provided below.
- Add a x:Name attribute to the TabButton so you can reference it in the code-behind.
- Add a TapGestureRecognizer to the TabButton, and a corresponding handler in the code-behind.
- To make life easier, add a BackgroundColor attribute to the TabButton, so you can see where the actual button is, and where the area of the whole control is.
- Add a Debug.WriteLine statement to the Tapped handler so you can see in the output window when it registers a tap.
- Run on either Android or iOS... Note that when you tap the button itself, taps are not registered. If you tap on the background area of the TabButton, the handler will fire.
Exceptions (if applicable)
N/A


