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);
            }
        }
Exemple #2
0
        public void OnRefresh()
        {
            try
            {
                NewReleasesSoundAdapter.SoundsList.Clear();
                NewReleasesSoundAdapter.NotifyDataSetChanged();

                RecentlyPlayedSoundAdapter.SoundsList.Clear();
                RecentlyPlayedSoundAdapter.NotifyDataSetChanged();

                PopularSoundAdapter.SoundsList.Clear();
                PopularSoundAdapter.NotifyDataSetChanged();

                GenresAdapter.GenresList.Clear();
                GenresAdapter.NotifyDataSetChanged();

                ArtistsAdapter.ArtistsList.Clear();
                ArtistsAdapter.NotifyDataSetChanged();

                RecommendedList.Clear();
                ViewPagerView.Adapter = null;

                EmptyStateLayout.Visibility = ViewStates.Gone;

                StartApiService();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Exemple #3
0
        //Refresh
        private void SwipeRefreshLayoutOnRefresh(object sender, EventArgs e)
        {
            try
            {
                MAdapter.SoundsList.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);
            }
        }