コード例 #1
0
        public override void OnSwiped(RecyclerView.ViewHolder p0, int p1)
        {
            if (p1 == ItemTouchHelper.Start)
            {
                _swipeListener.SwipeLeft(p0.AdapterPosition);
            }
            else if (p1 == ItemTouchHelper.End)
            {
                _swipeListener.SwipeRight(p0.AdapterPosition);
            }

            _adapter.OnItemDismiss(p0.AdapterPosition);

            /*
             * Handler handler = new Handler();
             * Runnable runnable = new Runnable(() =>
             * {
             *  _adapter.OnItemDismiss(p0.AdapterPosition);
             * });
             * handler.PostDelayed(runnable, 300);*/

            IContactViewHolder itemViewHolder = (IContactViewHolder)p0;

            itemViewHolder.SwipeHolder(p1);
        }
コード例 #2
0
 public override void OnSwiped(Android.Support.V7.Widget.RecyclerView.ViewHolder viewHolder, int i)
 {
     // Notify the adapter of the dismissal
     mAdapter.OnItemDismiss(viewHolder.AdapterPosition);
 }
コード例 #3
0
 public override void OnSwiped(RecyclerView.ViewHolder viewHolder, int direction)
 {
     mAdapter.OnItemDismiss(viewHolder.AdapterPosition);
 }