Right now, in my opinion, SwipeView is not very useful, because it responds to touches very bad. I was testing on the emulator and on the real device, and many times the SwipeView control was not responding to touches which is very annoying. I have shown that on the GIF below.
Especially on the left side of the SwipeView content, the responsiveness is very bad.
On the real device, UX is worse than on the emulator.
Please also compare the SwipeView with the Gmail app. In the Gmail app, when I swipe the message it executes perfectly and it is much smoother than SwipeView.
I was testing only on Android.
SwipeView should work seamlessly and give the best possible UX.
The UX is bad. The swipe is sometimes executed and sometimes not.
In the repro sample you have a SwipeItem defined in the RightItems. This means that the swipe is allowed from the right to the left. From the left to the right nothing should happen.
If you do not define elements in a specific direction, the swipe (touch) will not work (well, will do nothing).
If you swipe from left to right and quickly from right to left and open the SwipeView, there is a fix related. It is related to swipe quickly in several directions https://github.com/xamarin/Xamarin.Forms/pull/8849
@jsuarezruiz
I know that in my case swipe is only allowed from right to left. I was swiping only in this direction.
The problem is that swiping is sometimes not triggered and this happens very often.
To show that better to you, in my project try to swipe from right to left all items in the list. Try to do it quickly.
Here are my results on the emulator:
As you can see swipe was not triggered twice.
Then try again on a real device with your thumb. The results will be worse. In the current state, this control is not user-friendly.
Thanks for the feedback, we will do tests and continue to improve the SwipeView.
@jsuarezruiz
Thanks for your response. In case of questions, feel free to ask :)
Tested on iOS and I see the same issues. Responsiveness is very poor. Swiping right-to-left requires that you start at the right side; starting from middle or left side will not open the context menu. The context menu also won't stay open, and often closes immediately by itself. I think that possibly scrolling the ListView while swiping seems to trigger the close.
Please compare the UX on iOS to the native ListView ContextActions/MenuItem as an example of how the SwipeView should behave on both iOS and Android.
I have the same issue.
I didn't notice the problem before using a real device, and I don't have the issue in iOS. Only physical Android devices. Both Samsung and Huawei.
In the debug on Android I can see that a swipe gesture is detected by the device. It is just not always picked up by SwipeView.SwipeStarted. So I think the SwipeView is too sensitive.
My custom cell in a listview looks like this. However it was also an issue with basic 'SwipeItem's.
<?xml version="1.0" encoding="UTF-8"?>
<ViewCell ...>
<ViewCell.View>
<SwipeView
CascadeInputTransparent="False"
InputTransparent="False"
x:Name="swipeView"
Margin="0,4"
SwipeStarted="SwipeView_SwipeStarted"
IsEnabled="True">
<SwipeView.RightItems>
<SwipeItems>
<SwipeItemView
Command="{Binding OnCompletedClicked}">
<StackLayout
BackgroundColor="{Binding CompletedColor}"
Margin="0"
Padding="0"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"
WidthRequest="110">
<Label Text="{Binding CompletedText}"
TextColor="White"
FontFamily="{StaticResource Font-Medium}"
FontSize="14"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"/>
</StackLayout>
</SwipeItemView>
<SwipeItemView
Command="{Binding OnNoShowClicked}">
<StackLayout
BackgroundColor="{Binding NoShowColor}"
Margin="0"
Padding="0"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"
WidthRequest="110">
<Label Text="{Binding NoShowText}"
TextColor="White"
FontFamily="{StaticResource Font-Medium}"
FontSize="14"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"/>
</StackLayout>
</SwipeItemView>
</SwipeItems>
</SwipeView.RightItems>
<SwipeView.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</SwipeView.GestureRecognizers>
<Frame ...>
<StackLayout ...>
<Frame .../>
<StackLayout ...>
<StackLayout ...>
<Label ... />
<Label ... />
</StackLayout>
<Label .../>
</StackLayout>
<Image .../>
</StackLayout>
</Frame>
</SwipeView>
</ViewCell.View>
</ViewCell>
I have the same question, how's it going now?
@samhouts @jsuarezruiz Any info about this issue? It still happens in XF 4.5.0.356.
For me it seems to be a problem in combination with CollectionView. Swiping from right to left only works when being very fast and straight. Seems that in other case CollectionView is catching and cancelling the swipe event.
There is also a bug with SwipeItems icons of FontImageSource. Their ratio is not respected as shown below:
Tested using:
XF 4.5.0.356
Android 7.0
Huawei MediaPad T3
@RonnyBansemer Thanks for the feedback. The issue related with the touch conflicts will be fixed with this PR https://github.com/xamarin/Xamarin.Forms/pull/9664 while the issue calculating the size of the icon using a FontIcon on Android will be fixed with https://github.com/xamarin/Xamarin.Forms/pull/9955
I hope we can merge this fixes soon!.
closed by #9664
Most helpful comment
Tested on iOS and I see the same issues. Responsiveness is very poor. Swiping right-to-left requires that you start at the right side; starting from middle or left side will not open the context menu. The context menu also won't stay open, and often closes immediately by itself. I think that possibly scrolling the ListView while swiping seems to trigger the close.
Please compare the UX on iOS to the native ListView ContextActions/MenuItem as an example of how the SwipeView should behave on both iOS and Android.