public override Object GetChild(int groupPosition, int childPosition) { SongBundle song = listDataChild[listDataHeader[groupPosition]][childPosition]; if (Prefs.GetBoolean("auto_romanize_details", true) && song.Romanized != null) { return(song.Romanized.Title); } return(song.Normal.Title); }
public override View GetView(int position, View convertView, ViewGroup parent) { View view = convertView ?? activity.LayoutInflater.Inflate(Resource.Layout.list_non_grouped, parent, false); TextView titleTxt = view.FindViewById <TextView>(Resource.Id.songTitle); TextView artistTxt = view.FindViewById <TextView>(Resource.Id.songArtist); SongBundle song = allSongs.ElementAt(position); if (Prefs.GetBoolean("auto_romanize_details", true) && song.Romanized != null) { artistTxt.Text = song.Romanized.Artist; titleTxt.Text = song.Romanized.Title; } else { artistTxt.Text = song.Normal.Artist; titleTxt.Text = song.Normal.Title; } return(view); }
public override View GetView(int position, View convertView, ViewGroup parent) { View view = convertView ?? activity.LayoutInflater.Inflate(Resource.Layout.list_item, parent, false); TextView titleTxt = view.FindViewById <TextView>(Resource.Id.songTitle); TextView artistTxt = view.FindViewById <TextView>(Resource.Id.songArtist); ImageView coverImg = view.FindViewById <ImageView>(Resource.Id.cover); SongBundle song = songs[position]; if (Prefs.GetBoolean("auto_romanize_details", true) && song.Romanized != null) { artistTxt.Text = song.Romanized.Artist; titleTxt.Text = song.Romanized.Title; } else { artistTxt.Text = song.Normal.Artist; titleTxt.Text = song.Normal.Title; } ImageService.Instance.LoadUrl(song.Normal.Cover).Transform(new RoundedTransformation(20)).Into(coverImg); return(view); }