private void ButtonCancionesGustadas_Click(object sender, EventArgs e) { APIGatewayService api = new APIGatewayService(); List <Cancion> canciones = new List <Cancion>(); try { canciones = api.ObtenerCancionesGustadasPorIdUsuario(Usuario.Id); } catch (Exception ex) { canciones = new List <Cancion>(); Toast.MakeText(View.Context, "Error al cargar canciones.", ToastLength.Short); } canciones.ForEach(c => { try { c.Artistas = api.ObtenerArtistasPorIdCancion(c.Id); } catch (Exception ex) { c.Artistas = new List <Artista>(); Toast.MakeText(View.Context, "No se pudo cargar canciones completamente.", ToastLength.Short); } }); var listasFragment = new ListasFragment(canciones, "Canciones gustadas", null, Reproductor, Usuario, CambiarContenido); CambiarContenido.CambiarContenido(listasFragment); }
private void ListaDeReproduccionAdapter_ItemClick(object sender, ListasDeReproduccionRecyclerViewAdapterClickEventArgs e) { e.ListaDeReproduccion.CargarCancionesConArtistasYAlbum(); var listasFragment = new ListasFragment(e.ListaDeReproduccion.Canciones, e.ListaDeReproduccion.Nombre, null, Reproductor, Usuario, CambiarContenido); CambiarContenido.CambiarContenido(listasFragment); }