XamarinFormsGesture icon indicating copy to clipboard operation
XamarinFormsGesture copied to clipboard

Item not selecting/tap not firing on ListView

Open StephanBis opened this issue 7 years ago • 2 comments

I have the left and right gestures set up on my ListView like this xmlns:gestures="clr-namespace:Vapolia.Lib.Ui;assembly=XamarinFormsGesture"

<ListView SelectedItem="{Binding SelectedBooking}" gestures:Gesture.SwipeLeftCommand="{Binding ForwardDateCommand}" gestures:Gesture.SwipeRightCommand="{Binding BackwardDateCommand}">

I cannot tap or select an item in the ListView, my guess is that the gestures are blocking it. What am I doing wrong? When I use InputTransparent="True" I cannot even swipe on the ListView.

StephanBis avatar Aug 08 '18 09:08 StephanBis

Well the Xamarin Forms gesture architecture does not currently support more than one gesture on a View. So it's either the built in one (ListView scroll) or the one from this behavior.

Native android/ios gestures have a callback to link more than one gestures and decide which one to trigger. Forms does not have it.

You could update this behavior code to authorize any other gesture to be recognized at the same time as this one. But it creates other issues.

softlion avatar Aug 08 '18 11:08 softlion

Ok, good to know. Thank you for your explanation!

StephanBis avatar Aug 08 '18 11:08 StephanBis