示例#1
0
        //public void UpDateData(Photo[] temp) {
        //    mPhotoAlbum = temp;
        //    NotifyDataSetChanged();
        //}

        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.PhotoCardView, parent, false);

            PhotoViewHolder vh = new PhotoViewHolder(itemView, OnClick);

            return(vh);
        }
示例#2
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            PhotoViewHolder vh = holder as PhotoViewHolder;
            //***********************
            Photo item = mPhotoAlbum[position];

            vh.Caption.Text = item.Caption;

            vh.MyCheckBox.SetOnCheckedChangeListener(null);
            vh.MyCheckBox.SetOnCheckedChangeListener(new MyListener(item));
            vh.MyCheckBox.Checked = item.isChecked;

            vh.DeleteButton.SetOnClickListener(new MyRemoveItem(item, position));
        }