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); } }
//Start Play Sound private void TopSongsAdapterOnOnItemClick(object sender, HSoundAdapterClickEventArgs e) { try { if (e.Position > -1) { var item = TopSongsAdapter.GetItem(e.Position); if (item != null) { Constant.PlayPos = e.Position; GlobalContext?.SoundController?.StartPlaySound(item, TopSongsAdapter.SoundsList); } } } catch (Exception exception) { Console.WriteLine(exception); } }