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

            var item = _runs.ElementAt(position);

            vh.Caption.Text = item.Caption;
        }
예제 #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.runsCardView, parent, false);

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

            return(vh);
        }