コード例 #1
0
 /**
  * Disables any swipe to dismiss functionality set by either {@link #enableSwipeToDismiss(com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.OnDismissCallback)},
  * {@link #enableSwipeUndo(com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.undo.UndoCallback)} or {@link #enableSimpleSwipeUndo()}.
  */
 public void disableSwipeToDismiss()
 {
     mSwipeTouchListener = null;
 }
コード例 #2
0
 /**
  * Enables swipe to dismiss with contextual undo for this {@code DynamicListView}.
  *
  * @param undoCallback the {@link com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.undo.UndoCallback}
  *                     that is used.
  */
 public void enableSwipeUndo(IUndoCallback undoCallback)
 {
     mSwipeTouchListener = new SwipeUndoTouchListener(new DynamicListViewWrapper(this), undoCallback);
 }
コード例 #3
0
        /**
         * Enables swipe to dismiss with contextual undo for this {@code DynamicListView}.
         * This method requires that a {@link com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.undo.SwipeUndoAdapter} has been set.
         * It is allowed to have the {@code SwipeUndoAdapter} wrapped in a {@link com.nhaarman.listviewanimations.BaseAdapterDecorator}.
         *
         * @throws java.lang.IllegalStateException if the adapter that was set does not extend {@code SwipeUndoAdapter}.
         */
        public void enableSimpleSwipeUndo()
        {
            if (mSwipeUndoAdapter == null)
            {
                throw new Java.Lang.IllegalStateException("enableSimpleSwipeUndo requires a SwipeUndoAdapter to be set as an adapter");
            }

            mSwipeTouchListener = new SwipeUndoTouchListener(new DynamicListViewWrapper(this), mSwipeUndoAdapter.getUndoCallback());
            mSwipeUndoAdapter.setSwipeUndoTouchListener((SwipeUndoTouchListener)mSwipeTouchListener);
        }
コード例 #4
0
 /**
  * Enables swipe to dismiss functionality for this {@code DynamicListView}.
  *
  * @param onDismissCallback the {@link com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.OnDismissCallback}
  *                          that is notified of dismissals.
  */
 public void enableSwipeToDismiss(IOnDismissCallback onDismissCallback)
 {
     mSwipeTouchListener = new SwipeDismissTouchListener(new DynamicListViewWrapper(this), onDismissCallback);
 }
コード例 #5
0
 internal RestoreAnimatorListener(View view, int position,SwipeTouchListener instance)
 {
     mView = view;
     mPosition = position;
     minst = instance;
 }
コード例 #6
0
 public  FlingAnimatorListener(View view, int position,SwipeTouchListener instance)
 {
     mView = view;
     mPosition = position;
     minst = instance;
 }
コード例 #7
0
 internal RestoreAnimatorListener(View view, int position, SwipeTouchListener instance)
 {
     mView     = view;
     mPosition = position;
     minst     = instance;
 }
コード例 #8
0
 public FlingAnimatorListener(View view, int position, SwipeTouchListener instance)
 {
     mView     = view;
     mPosition = position;
     minst     = instance;
 }