Пример #1
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            //throw new NotImplementedException();
            PhotoViewHolder myHolder = holder as PhotoViewHolder;

            //    myHolder.mImage.SetImageResource(mPhotoAlbum[position].PhotoID);
            //myHolder.mImage.SetImageLocation.Resource(ic_launcher); ca sa iau o imagine existenta-ceva de genul era
            myHolder.mImage.SetImageBitmap(mPhotoAlbum[position]);
            myHolder.image = mPhotoAlbum[position];
        }
Пример #2
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            // throw new NotImplementedException();
            View      ItemiPhoto = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.ItemiPhoto, parent, false);
            ImageView imageview  = ItemiPhoto.FindViewById <ImageView>(Resource.Id.imageView);

            //  imageview.Click += Imageview_Click;

            PhotoViewHolder view = new PhotoViewHolder(ItemiPhoto, OnCellClick_Image)
            {
                mImage = imageview
            };

            view.Update(imageview);
            return(view);
        }