public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { var inflater = LayoutInflater.FromContext(parent.Context); View itemView = inflater.Inflate(Resource.Layout.todo_cardview, parent, false); TodoAdapterViewHolder viewHolder = new TodoAdapterViewHolder(itemView); return(viewHolder); }
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { TodoAdapterViewHolder viewHolder = holder as TodoAdapterViewHolder; viewHolder.TitleTextView.Text = _todos[position].Title; viewHolder.UserIdTextView.Text = _todos[position].UserId.ToString(); viewHolder.CompletedCheckBox.Checked = _todos[position].Completed; }