private async Task ReloadAdapter() { await Task.Run(() => { var list = SongLoader.GetAllSongs(Activity); _songListAdapter.UpdateData(list); }); _songListAdapter.NotifyDataSetChanged(); }
private async Task LoadSong() { if (Activity is null) { return; } await Task.Run(() => { _songListAdapter = new SongListAdapter((AppCompatActivity)Activity, SongLoader.GetAllSongs(Activity), false); }); _recyclerView.AddItemDecoration(new DividerItemDecoration(Activity, DividerItemDecoration.Vertical)); }