OnCreateViewHolder(ViewGroup parent, int viewType) { // Inflate the CardView for the photo: View itemView = LayoutInflater.From(parent.Context). Inflate(Resource.Layout.AddContactListItem, parent, false); AddMoreContactsListHolder vh = new AddMoreContactsListHolder(itemView, OnClick); return(vh); }
OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { AddMoreContactsListHolder vh = holder as AddMoreContactsListHolder; var item = originalContacts[position]; vh.txtSenderName.Text = item.FirstName + " " + item.LastName; if (item.ProfileImageUrl != null) { CommonHelper.SetImageOnUIImageView(vh.contactPic, item.ProfileImageUrl, Contextt, 400, 400); } UserProfile addContactModel = originalContacts[position]; var addContactListEvent = new AddMoreContactListner(addContactModel, Contextt); vh.AddContactButton.SetOnClickListener(addContactListEvent); addContactListEvent.ListReload += RefreshList; }