public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { SleepSessionViewHolder vh = holder as SleepSessionViewHolder; vh.Caption.Text = mSessions[position].Caption; vh.Dates.Text = $"{mSessions[position].StartSleepTime.ToString("G")} " + $"-\n{mSessions[position].EndSleepTime.ToString("G")}"; vh.SetItemClickListener(this); }
public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.From(parent.Context). Inflate(Resource.Layout.SleepSessionView, parent, false); SleepSessionViewHolder vh = new SleepSessionViewHolder(view); return(vh); }