xamarin/Xamarin.Forms
[Bug, Android, UWP] Image NumberOfTapsRequired fails on Android when greater than 2
Aperta
#6976 aperta il 25 lug 2019
a/gestures 🖖e/3 :clock3:help wantedp/Androidp/UWPt/bug :bug:up-for-grabs
Metriche repository
- Star
- (5644 stelle)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Description
When adding Image.GestureRecognizers XAML as per the documentation, it will only work when the NumberOfTapsRequired property is set to 1 or 2.
Steps to Reproduce
- Create a basic Xamarin Forms Project and in MainPage.xaml, add the following
<Image Source="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Xamarin-logo.svg/1280px-Xamarin-logo.svg.png" VerticalOptions="Center" HeightRequest="64"> <Image.GestureRecognizers> <TapGestureRecognizer Tapped="OnTapGestureRecognizerTapped" NumberOfTapsRequired="3" /> </Image.GestureRecognizers> </Image> - Add the following code in MainPage.xaml.cs:
void OnTapGestureRecognizerTapped(object sender, EventArgs args) { DisplayAlert("Hello", "Hello World!", "OK"); } - Run Android Project and attempt to tap the app multiple times.
Expected Behavior
The alert is displayed after three taps (this works as expected in iOS)
Actual Behavior
No alert is displayed, even after numerous taps.
Basic Information
- Version with issue: 4.1.0.555618
- Last known good version: Unknown
- IDE: Visual Studio for Mac 8.2 Enterprise
- Platform Target Frameworks:
- iOS: 21.14.0.110
- Android: 9.4.0.51
- Nuget Packages: None
- Affected Devices: All Android