xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.63k stars 1.87k forks source link

[Bug][IOS][ANDROID] CarouselView vertical swipe also leads to next or prev item. #13672

Open Sasha111ua opened 3 years ago

Sasha111ua commented 3 years ago

Description

If you swipe vertically on carouselview it goes to next or previous item, you have to be very precise to swipe vertically straight if you want to stay on the current item. If I understand this correctly, it uses some kind of swipe acceleration or speed and does deceleration and this is how delta on X became big enough to switch the item. There should be a way to disable that, especially for IOS where you have to just touch the screen and swipe a little to go to next item.

Steps to Reproduce

  1. Run the app
  2. Try to do a fast vertical swipe

Expected Behavior

Current item is not changed

Actual Behavior

CarouselView goes to next/prev item

Basic Information

Environment

Show/Hide Visual Studio info ``` ```

Reproduction Link

https://drive.google.com/file/d/18paj6iBhDK_Rf9T5UNnenfVFFXSBmDmE/view?usp=sharing

rachelkang commented 3 years ago

Hi, @Sasha111ua - thanks for submitting this issue! I tried reproducing, and I see what you mean - however, I don't think this is a bug. As you indicated, when we manually swipe vertically and quickly, we often swipe at a bit of an angle, which is what triggers the horizontal swipe to occur.

That being said, I think this is definitely a great feature request, assuming we don't already have something similar (like SwipeView threshold) - @jsuarezruiz @rmarinho what do you think?

Sasha111ua commented 3 years ago

thanks, @rachelkang, maybe you have any ideas on how this can be disabled?

Kapusch commented 3 years ago

Hi @Sasha111ua , when you said "vertical swipe also leads to next or prev item"... do you mean that it does also work with an horizontal swipe gesture ?

Because in my case, I've just noticed with XF 5.0.0.1931 that horizontal swipe just does not work at all on Android. Only vertical swipe seems enabled !