Here my code :
private SfPullToRefresh pullToRefresh;
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var _rootView = inflater.Inflate(Resource.Layout.PullToRefersh, container, false);
_rootView.SetBackgroundColor(Color.AliceBlue);
var items = new List<string>();
for (int i = 0; i < 100; i++)
{
items.Add(i.ToString());
}
var listAdapter = new ArrayAdapter<String>(this.Context, Android.Resource.Layout.SimpleListItem1, items);
var listView = _rootView.FindViewById<ListView>(Resource.Id.List);
listView.Adapter = listAdapter;
pullToRefresh = new SfPullToRefresh(this.Context);
pullToRefresh.Refreshed += PullToRefresh_Refreshed;
pullToRefresh.PullableContent = listView;
return _rootView;
}
private async void PullToRefresh_Refreshed(object sender, EventArgs e)
{
await Task.Delay(5000);
pullToRefresh.Refresh();
}
Attachment:
Screenshot_1505383647_23954ea9.rar