public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { ItemsViewHolder vh = holder as ItemsViewHolder; // Load the photo caption from the photo album: vh.Name.Text = viewModel.Items[position].Name; vh.Country.Text = viewModel.Items[position].Country; }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.From(parent.Context). Inflate(Resource.Layout.adapter_item, parent, false); // Create a ViewHolder to hold view references inside the CardView: ItemsViewHolder item = new ItemsViewHolder(itemView, OnClick, OnLongClick); return(item); }