OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { MyImageViewHolder vh = holder as MyImageViewHolder; // Set the ImageView and TextView in this ViewHolder's CardView // from this position in the MyImage album: vh.Image.SetImageResource(mMyImageAlbum[position].ImageID); }
OnCreateViewHolder(ViewGroup parent, int viewType) { // Inflate the CardView for the photo: View itemView = LayoutInflater.From(parent.Context). Inflate(Resource.Layout.ImageCardView, parent, false); // Create a ViewHolder to find and hold these view references, and // register OnClick with the view holder: //MyImageViewHolder vh = new MyImageViewHolder(itemView, OnClick); MyImageViewHolder vh = new MyImageViewHolder(itemView); return(vh); }