diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2017-09-27 13:18:21 -0600 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-10-23 13:33:21 +0900 |
commit | ed5c8b0def0fda9dfeb19d452427094f63b2511c (patch) | |
tree | fb91aedcf78b1a77d2d86b49d3b99cea8273470f /Xamarin.Forms.Platform.Android | |
parent | 93495b1208e0d38e2520e7f6e07f8bcc668e8604 (diff) | |
download | xamarin-forms-ed5c8b0def0fda9dfeb19d452427094f63b2511c.tar.gz xamarin-forms-ed5c8b0def0fda9dfeb19d452427094f63b2511c.tar.bz2 xamarin-forms-ed5c8b0def0fda9dfeb19d452427094f63b2511c.zip |
Fix context action/tap gesture conflict when tap gesture is on nested view (#1154)
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r-- | Xamarin.Forms.Platform.Android/Cells/ViewCellRenderer.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Android/Cells/ViewCellRenderer.cs b/Xamarin.Forms.Platform.Android/Cells/ViewCellRenderer.cs index 44f2bbbc..46b3321d 100644 --- a/Xamarin.Forms.Platform.Android/Cells/ViewCellRenderer.cs +++ b/Xamarin.Forms.Platform.Android/Cells/ViewCellRenderer.cs @@ -242,7 +242,13 @@ namespace Xamarin.Forms.Platform.Android // LongClick handling from happening. So we need to watch locally for LongPress and if we see it, // trigger the LongClick manually. _watchForLongPress = _viewCell.ContextActions.Count > 0 - && vw.GestureRecognizers.Any(t => t is TapGestureRecognizer); + && HasTapGestureRecognizers(vw); + } + + static bool HasTapGestureRecognizers(View view) + { + return view.GestureRecognizers.Any(t => t is TapGestureRecognizer) + || view.LogicalChildren.OfType<View>().Any(HasTapGestureRecognizers); } void TriggerLongClick() |