コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }