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

            var item = _stays.ElementAt(position);

            vh.City.Text = item.City;
        }
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.staysCardView, parent, false);

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

            return(vh);
        }