CollectionView aims to be more flexible by provide us the ability to know when CollectionView has been scrolled.
Many people have been asking for such an event, and a quick web search for 'xamarin forms listview scroll event' shows it. to make parallax headers, make some views dis/appearing when scroll up/down or other stuff using the scroll event.
| API | Description |
| ------------- | ------------- |
| Scrolled | Occurs when user interact with the CollectionView|
this is exact same signature of ScrollView.Scrolled event .
public event EventHandler<Xamarin.Forms.ScrolledEventArgs> Scrolled;
New feature, so it does not have any impact.
Hmmm...
CollectionView inherit from ScrollView, it should not be a big deal.
RecyclerViewScrollListener to Android's ItemsViewRenderer and can be used to send scroll events.It would be awesome if the ScrolledEventArgs could provide us some ScrollStatus,
similar to PanUpdatedEventArgs.StatusType Property
public enum ScrollStatus
| Enum | Int |Description|
| ------------- | ------------- |------------- |
|Canceled | 3 | The scroll was canceled|
|Completed | 2 | The scroll completed|
|Running | 1 | The scroll is still being recognized|
|Started | 0 | The scroll started|
@Phenek We might need to create a different event for this. ScrolledEventArgs is getting crowded with multiple properties already and provides numerical data. State data can be provided by another event, in my opinion.
With merging #5754 I’m going to close this for now. The basic Scrolled event is there, if there is anything you are still missing please open a new issue with the specific information for that. And let us know what you think of the current implementation when it’s released, thanks!
is there already anything related to ScrollState here? or should we create another issue?
we need to have something like ScrollStateChanged with ScrollStateChangedEventArgs
which has ScrollState with Fling, Idle, Cancelled, Completed etc.
@EmilAlipiev look here #11059
Most helpful comment
It would be awesome if the ScrolledEventArgs could provide us some ScrollStatus,
similar to PanUpdatedEventArgs.StatusType Property
public enum ScrollStatus| Enum | Int |Description|
| ------------- | ------------- |------------- |
|Canceled | 3 | The scroll was canceled|
|Completed | 2 | The scroll completed|
|Running | 1 | The scroll is still being recognized|
|Started | 0 | The scroll started|