Beispiel #1
0
 public AccountAdapter(
     Accounts data,
     IAccountItemClickListener listener)
 {
     _data     = data;
     _listener = listener;
 }
Beispiel #2
0
        public AccountViewHolder(View item, IAccountItemClickListener listener) : base(item)
        {
            _tvFullName    = item.FindViewById <MaterialTextView>(Resource.Id.item_account_fullname);
            _tvUserName    = item.FindViewById <MaterialTextView>(Resource.Id.item_account_username);
            _tvFollowings  = item.FindViewById <MaterialTextView>(Resource.Id.item_account_followings);
            _tvFollowers   = item.FindViewById <MaterialTextView>(Resource.Id.item_account_followers);
            _tvUnfollowers = item.FindViewById <MaterialTextView>(Resource.Id.item_account_unfollowers);

            var menu = new MenuBuilder(ItemView.Context);

            menu.SetCallback(this);

            var inflater = new SupportMenuInflater(ItemView.Context);

            inflater.Inflate(Resource.Menu.popup_account, menu);

            _popup = new MenuPopupHelper(ItemView.Context, menu);
            _popup.SetAnchorView(ItemView);
            _popup.SetForceShowIcon(true);

            _listener = listener;

            var card = item.FindViewById <MaterialCardView>(Resource.Id.item_account_card);

            if (card == null)
            {
                return;
            }
            card.Click     += Item_Click;
            card.LongClick += Item_LongClick;
        }
Beispiel #3
0
 AccountAdapter IInstagramAccounts.CreateAccountAdapter(IAccountItemClickListener listener)
 {
     return(new AccountAdapter(_accounts, listener));
 }