コード例 #1
0
        OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            BlockedContactListHolder vh = holder as BlockedContactListHolder;
            var item = originalContacts[position];

            if (item != null)
            {
                var BlockListContact = Repositories.ContactRepository.GetContactbyUserId(Convert.ToInt32(item.ContactId));


                if (BlockListContact != null)
                {
                    vh.txtSenderName.Text = BlockListContact.screenName;
                }
                if (BlockListContact != null && BlockListContact.contactPicUrl == "")
                {
                    CommonHelper.SetImageOnUIImageView(vh.contactPic, BlockListContact.contactPicUrl, Contextt, 400, 400);
                }
            }

            //ChatConversation RemoveContactModel = originalContacts[position];
            // var removeContactListEvent = new BlockedContactListListner(ChatConversation, Contextt);
            //  vh.AddContactButton.SetOnClickListener(addContactListEvent);
            // removeContactListEvent.ListReload += RefreshList;

            vh.removeContactButton.SetOnClickListener(new removeContactButtonClickListener(item, Contextt));
        }
コード例 #2
0
        OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            // Inflate the CardView for the photo:
            View itemView = LayoutInflater.From(parent.Context).
                            Inflate(Resource.Layout.BlockedContactListItemLayout, parent, false);

            BlockedContactListHolder vh = new BlockedContactListHolder(itemView, OnClick);



            return(vh);
        }