Exemple #1
0
        OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            TaskViewHolder vh = holder as TaskViewHolder;

            // Set the ImageView and TextView in this ViewHolder's CardView
            // from this position in the photo album:
            vh.Title.Text       = _tasks[position].Title;
            vh.Description.Text = _tasks[position].Description;
            vh.Start.Text       = _tasks[position].Start.ToLongDateString();
            vh.Repeat.Text      = _tasks[position].Repeat.ToString();
        }
Exemple #2
0
        OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            // Inflate the CardView for the photo:
            View itemView = LayoutInflater.From(parent.Context).
                            Inflate(Resource.Layout.TaskRecyclerView, parent, false);

            // Create a ViewHolder to find and hold these view references, and
            // register OnClick with the view holder:
            TaskViewHolder vh = new TaskViewHolder(itemView, OnClick);

            return(vh);
        }