public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.From(parent.Context). Inflate(Resource.Layout.file_list_item, parent, false); var vh = new MediaItemViewHolder(view, OnClick); return(vh); }
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { MediaItemViewHolder vh = holder as MediaItemViewHolder; vh.Item = mValues[position]; vh.TitleView.Text = mValues[position].Description.Title; vh.ArtistView.Text = mValues[position].Description.Subtitle; vh.DurationView.Text = DateUtils.FormatElapsedTime(mValues[position].Description .Extras.GetLong(MediaMetadataCompat.MetadataKeyDuration) / 1000); }