public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.timesheet_line_hours, parent, false); TimesheetWorkViewHolder vh = new TimesheetWorkViewHolder(view, ItemClick); return(vh); }
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { TimesheetWorkViewHolder vh = holder as TimesheetWorkViewHolder; vh.start.Text = mTimesheetWork[position].startDate.ToLongDateString(); vh.actual.Hint = mTimesheetWork[position].actualHours; vh.planned.Hint = mTimesheetWork[position].plannedHours; vh.actual.TextChanged += (sender, e) => { mTimesheetActivity.setActualHours(e.Text.ToString(), mTimesheetWork[position].startDate); }; vh.planned.TextChanged += (sender, e) => { mTimesheetActivity.setPlannedHours(e.Text.ToString(), mTimesheetWork[position].startDate); }; }