public ViewHolderActionClickListener(SwipeActionsThresholdsViewHolder vh, int position, SwipeActionsBehavior sab, ListViewSwipeActionsThresholdsAdapter adapter) { this.vh = vh; this.sab = sab; this.position = position; this.adapter = adapter; }
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); }
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)); }