Пример #1
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View           itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.PhotoCard, parent, false);
            FoodViewHolder vh       = new FoodViewHolder(itemView, OnClick);

            return(vh);
        }
Пример #2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            FoodViewHolder vh = holder as FoodViewHolder;

            vh.Image.SetImageResource(mFoodObject[position].mPhotoID);
            vh.Caption.Text = mFoodObject[position].mCaption;
        }