public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.From(parent.Context). Inflate(Resource.Layout.LotCardView, parent, false); // Create a ViewHolder to find and hold these view references, and // register OnClick with the view holder: LotViewHolder vh = new LotViewHolder(itemView); return(vh); }
//void OnClick(int position) //{ // if (ItemClick != null) // ItemClick(this, listOfArticles[position].Id); //} public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { LotViewHolder vh = holder as LotViewHolder; // Set the TextViews in this ViewHolder's CardView // from this position in the photo album: vh.lotNameExpireDate.Text = listOfLots[position].Name + "/" + listOfLots[position].ExpireDate; vh.lotQuantity.Text = listOfLots[position].QuantityDisplay; vh.lotRadioButton.Text = listOfLots[position].LotId; vh.lotRadioButton.CheckedChange += LotRadioButton_CheckedChange; vh.lotRadioButton.Tag = position; }