public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.task_recycler, parent, false); Task2ViewHolder vh = new Task2ViewHolder(itemView, OnClick); return(vh); }
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { Task2ViewHolder vh = holder as Task2ViewHolder; vh.projectName.Text = mTask2[position].mProjectName; vh.startDate.Text = mTask2[position].mStartDate; vh.endDate.Text = mTask2[position].mEndDate; vh.percent.Text = mTask2[position].mPercent; vh.work.Text = mTask2[position].mWork; vh.duration.Text = mTask2[position].mDuration; vh.resource.Click += delegate { main.bringDialogs(1); }; vh.edit.Click += delegate { main.bringDialogs(2); }; vh.delete.Click += delegate { main.bringDialogs(3); }; }