Exemplo n.º 1
0
        /// <summary>
        /// Fill controls values in card
        /// </summary>
        /// <param name="listViewHolder"></param>
        /// <param name="position"></param>
        private void OnListViewSetControls(ListViewAdapter.ListViewHolder listViewHolder, int position)
        {
            ListItemSong listItemSong = null;

            if (IsFolderButtonPressed)
            {
                listItemSong = SongFoldersList[position];
                string pathOnlyName = GetFolderNameFromPath(listItemSong.getSongPath());
                string fileName     = listItemSong.getSongName();

                listViewHolder.FirstLine.SetText(pathOnlyName, TextView.BufferType.Normal);
                listViewHolder.SecondLine.SetText(listItemSong.getArtist(), TextView.BufferType.Normal);
                listViewHolder.ThirdLine.SetText(listItemSong.getSongPath(), TextView.BufferType.Normal);
            }
            else
            {
                KeyValuePair <string, ListItemSong> songItem = ListItemsRecycler[position];
                listItemSong = songItem.Value;

                string songLenght = (listItemSong.getDuration() == "") ? listItemSong.getArtist() : listItemSong.getDuration();
                string songName   = listItemSong.getSongName();

                listViewHolder.FirstLine.SetText(songName, TextView.BufferType.Normal);
                listViewHolder.SecondLine.SetText(songLenght, TextView.BufferType.Normal);
                listViewHolder.ThirdLine.SetText(listItemSong.getSongPath(), TextView.BufferType.Normal);
            }
        }
Exemplo n.º 2
0
 private void ListSongOrFolder_ItemClick(ListViewAdapter.ListViewHolder listViewHolder, int position)
 {
     ChooseFileItem(position);
 }