コード例 #1
0
 public ViewHolderActionClickListener(SwipeActionsThresholdsViewHolder vh, int position, SwipeActionsBehavior sab, ListViewSwipeActionsThresholdsAdapter adapter)
 {
     this.vh       = vh;
     this.sab      = sab;
     this.position = position;
     this.adapter  = adapter;
 }
コード例 #2
0
        public override ListViewHolder OnCreateSwipeContentHolder(ViewGroup viewGroup)
        {
            LayoutInflater inflater             = LayoutInflater.From(viewGroup.Context);
            View           swipeContentView     = inflater.Inflate(Resource.Layout.example_list_swipe_actions_buttons, viewGroup, false);
            SwipeActionsThresholdsViewHolder vh = new SwipeActionsThresholdsViewHolder(swipeContentView);

            return(vh);
        }
コード例 #3
0
        public override void OnBindSwipeContentHolder(ListViewHolder viewHolder, int position)
        {
            EmailMessage currentMessage = (EmailMessage)GetItem(position);
            SwipeActionsThresholdsViewHolder swipeContentHolder = (SwipeActionsThresholdsViewHolder)viewHolder;

            swipeContentHolder.action1.SetOnClickListener(new ViewHolderActionClickListener(swipeContentHolder, position, sab, this));

            swipeContentHolder.action2.SetOnClickListener(new ViewHolderActionClickListener(swipeContentHolder, position, sab, this));
        }