示例#1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View view            = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.booking_index_recycler, parent, false);
            BookingViewHolder vh = new BookingViewHolder(view, OnClick);

            return(vh);
        }
示例#2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            BookingViewHolder vh = holder as BookingViewHolder;

            vh.Item = Items[position];

            vh.Restaurant.Text  = vh.Item.Restaurant.Name;
            vh.Date.Text        = vh.Item.BookingDate.ToShortDateString();
            vh.Time.Text        = vh.Item.StartTime.Hours + ":" + vh.Item.StartTime.Minutes;
            vh.NoCustomers.Text = vh.Item.NoCustomers.ToString();
            vh.Cancelled.Text   = vh.Item.Cancelled.ToString();
        }