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

            // Load the Chore Name from the container:
            vh.HouseName.Text = houseCollection[position].HouseName;
            // Load the Chore Date from the container:
            vh.Location.Text = houseCollection[position].Location;
        }
Exemple #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.HouseCardView, parent, false);

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

            return(vh);
        }