private void CreateYouTubeItemView(YouTubeVideo video, ComboBoxItemLoadingEventArgs e) { View originalItemView = e.ItemView; var itemView = LayoutInflater.FromContext(originalItemView.Context).Inflate(Resource.Layout.ListItem, (ViewGroup)originalItemView.Parent, false); YoutubeViewHolder holder = new YoutubeViewHolder(itemView); holder.SetTitle(video.Title); holder.SetSubtitle(video.Description); holder.SetVideoThumbnail(video.Thumbnail, CancellationToken.None); e.ItemView = holder.ItemView; }
private UITableViewCell GetYoutubeCell(C1AutoComplete filterDropdown, YouTubeVideo video, ComboBoxItemLoadingEventArgs e) { UITableViewCell cell = e.GetReusableItemView(YouTubeCellIdentifier); if (cell == null) { cell = new UITableViewCell(UITableViewCellStyle.Subtitle, YouTubeCellIdentifier); } LoadImageInBackground(cell.ImageView, video.Thumbnail); cell.TextLabel.Text = video.Title; cell.DetailTextLabel.Text = video.Description; return(cell); }