public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { RunsListAdapterViewHolder vh = holder as RunsListAdapterViewHolder; var item = _runs.ElementAt(position); vh.Caption.Text = item.Caption; }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { // Inflate the CardView for the photo: View itemView = LayoutInflater.From(parent.Context). Inflate(Resource.Layout.runsCardView, parent, false); // Create a ViewHolder to hold view references inside the CardView: RunsListAdapterViewHolder vh = new RunsListAdapterViewHolder(itemView, OnClick); return(vh); }