Detect scrolling ended in Xamarin.Forms.Scrollview
xamarin.forms
Solution
You can detect it by implementing this event handler: Assuming your list is called Items, then you need to add this code to your page.xaml.cs file:
var listview = new ListView ();
listview.ItemsSource = Items;
listview.ItemAppearing += (sender, e) =>
{
if(isLoading || Items.Count == 0)
return;
//hit bottom!
if(e.Item.ToString() == Items[Items.Count - 1])
{
LoadItems();
}
}
You can check the full implementation details here: https://gist.github.com/jamesmontemagno/465ced24fc8a206dcaf3#file-loadmoreonbottom-cs
Problem
I am trying to customize a scroll view to meet my particular set of requirements, and what I would like to do it detect when the user stops scrolling or otherwise takes their finger off the screen. I have tried several methods of attaching event listeners but have yet to find one that will actually fire any events. I need to make this work on android and iOS, and would be happy to do this in either cross platform or platform specific code. If anyone can provide any guidance, I would be extremely grateful! As a small side note, if anyone could explain why in my custom scrollview renderer doing `Touch += MyTouchHandler` doesn't allow my touch handler to be called, that would be enormously helpful.