Esempio n. 1
0
        private async void Fav(object sender, EventArgs e)
        {
            Song current = await MusicPlayer.GetItem();

            if (await SongManager.IsFavorite(current))
            {
                MainActivity.instance?.FindViewById <ImageButton>(Resource.Id.fav)?.SetImageResource(Resource.Drawable.Fav);
                SongManager.UnFav(current);
            }
            else
            {
                MainActivity.instance?.FindViewById <ImageButton>(Resource.Id.fav)?.SetImageResource(Resource.Drawable.Unfav);
                SongManager.Fav(current);
            }
        }