public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.From(parent.Context) .Inflate(Resource.Layout.card_view_question, parent, false); CardQuestionViewHolder viewHolder = new CardQuestionViewHolder(itemView, OnClick); return(viewHolder); }
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { CardQuestionViewHolder viewHolder = (CardQuestionViewHolder)holder; // Set the CardView's Elements viewHolder.TextId.Text = $"Question {DataSet[position].Id}"; viewHolder.TextQuestion.Text = DataSet[position].Question; viewHolder.QuestionScaleChecked += QuestionScaleChecked; }