public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.Chemical, parent, false); ChemicalHolder vh = new ChemicalHolder(itemView); return(vh); }
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { ChemicalHolder vh = holder as ChemicalHolder; var chemical = _items[position]; vh.Image.SetImageResource(chemical.DrawableId); vh.Caption.Text = chemical.Name; }