roubachof / Sharpnado.CollectionView

A performant list view supporting: grid, horizontal and vertical layout, drag and drop, and reveal animations.
The Unlicense
244 stars 30 forks source link

Carousel didn't work well when inside horizontall scroll #82

Open ems107 opened 1 year ago

ems107 commented 1 year ago

This is a bug that also occurs with the CarouselView from Xamarin.Forms. It is a problem that exists with Android when deciding the scroll priority for a component (https://github.com/xamarin/Xamarin.Forms/issues/9315).

My proposed solution is to force touchscreen detection on the component based on a property. When the scroll direction of the Carousel (or any scrollable component) matches the scroll direction of the parent component (a list in my case) is when the problem occurs. If the Carousel is inside a vertical list, it works fine (and there is no point in forcing touch screen detection). I've used a property for this because I don't know how to determine when it's needed by code.

Without changes:

https://user-images.githubusercontent.com/47887015/195582169-c42d8f1b-37d2-44d0-a667-7150700f483c.mp4

With changes:

https://user-images.githubusercontent.com/47887015/195581844-733f1b12-0d3a-422d-9cf1-65f281479d12.mp4

roubachof commented 1 year ago

missing ios implementation