Beispiel #1
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            StaffViewHolder vh = holder as StaffViewHolder;

            // Load the Staff Name from the container:
            vh.StaffName.Text = staffCollection[position].StaffName;
            // Load the Service Location from the container:
            //vh.Location.Text = staffCollection[position].Location;
        }
Beispiel #2
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            // Inflate the CardView for the photo:
            View itemView = LayoutInflater.From(parent.Context).
                            Inflate(Resource.Layout.StaffCardView, parent, false);

            // Create a ViewHolder to hold view references inside the CardView:
            StaffViewHolder vh = new StaffViewHolder(itemView, OnClick);

            return(vh);
        }