示例#1
0
        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);
        }
示例#2
0
        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);
        }