public void OnRefresh() { try { LatestSongsAdapter.SoundsList.Clear(); LatestSongsAdapter.NotifyDataSetChanged(); TopSongsAdapter.SoundsList.Clear(); TopSongsAdapter.NotifyDataSetChanged(); AlbumsAdapter.AlbumsList.Clear(); AlbumsAdapter.NotifyDataSetChanged(); StoreAdapter.SoundsList.Clear(); StoreAdapter.NotifyDataSetChanged(); ActivitiesAdapter.ActivityList.Clear(); ActivitiesAdapter.NotifyDataSetChanged(); EmptyStateLayout.Visibility = ViewStates.Gone; new Handler(Looper.MainLooper).Post(new Runnable(Run)); } catch (Exception e) { Console.WriteLine(e); } }
//Refresh private void SwipeRefreshLayoutOnRefresh(object sender, EventArgs e) { try { MAdapter.AlbumsList.Clear(); MAdapter.NotifyDataSetChanged(); MRecycler.Visibility = ViewStates.Visible; EmptyStateLayout.Visibility = ViewStates.Gone; MainScrollEvent.IsLoading = false; StartApiService(); } catch (Exception exception) { Console.WriteLine(exception); } }
private void SwipeRefreshLayoutOnRefresh(object sender, EventArgs e) { try { TopSongsSoundAdapter.SoundsList.Clear(); TopSongsSoundAdapter.NotifyDataSetChanged(); AlbumsAdapter.AlbumsList.Clear(); AlbumsAdapter.NotifyDataSetChanged(); EmptyStateLayout.Visibility = ViewStates.Gone; StartApiService(); } catch (Exception exception) { Console.WriteLine(exception); } }