lib-manipulation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/dragdrop/DragAndDropHandler.java
@Override
    public boolean onTouchEvent(@NonNull final MotionEvent event) {
        boolean handled = false;

        /* We are in the process of animating the hover drawable back, do not start a new drag yet. */
        if (!mIsSettlingHoverDrawable) {
            switch (event.getAction() & MotionEvent.ACTION_MASK) {
                case MotionEvent.ACTION_DOWN:
                    mLastMotionEventY = event.getY();
                    handled = handleDownEvent(event);
                    break;
                case MotionEvent.ACTION_MOVE:
                    mLastMotionEventY = event.getY();
                    handled = handleMoveEvent(event);
                    break;
                case MotionEvent.ACTION_UP:
                    handled = handleUpEvent();
                    mLastMotionEventY = -1;
                    break;
                case MotionEvent.ACTION_CANCEL:
                    handled = handleCancelEvent();
                    mLastMotionEventY = -1;
                    break;
                default:
                    handled = false;
                    break;
            }
        }
        return handled;
    }
@Override
    public boolean onTouchEvent(@NonNull final MotionEvent event) {
        boolean handled = false;

        /* We are in the process of animating the hover drawable back, do not start a new drag yet. */
        if (!mIsSettlingHoverDrawable) {
            switch (event.getAction() & MotionEvent.ACTION_MASK) {
                case MotionEvent.ACTION_DOWN:
                    mLastMotionEventY = event.getY();
                    handled = handleDownEvent(event);
                    break;
                case MotionEvent.ACTION_MOVE:
                    mLastMotionEventY = event.getY();
                    handled = handleMoveEvent(event);
                    break;
                case MotionEvent.ACTION_UP:
                    handled = handleUpEvent();
                    mLastMotionEventY = -1;
                    break;
                case MotionEvent.ACTION_CANCEL:
                    handled = handleCancelEvent();
                    mLastMotionEventY = -1;
                    break;
                default:
                    handled = false;
                    break;
            }
        }
        return handled;
    }
@ Override public boolean onTouchEvent ( @ NonNull final MotionEvent event ) { boolean handled = false ; /* We are in the process of animating the hover drawable back, do not start a new drag yet. */ if ( ! mIsSettlingHoverDrawable ) { switch ( event . getAction ( ) & MotionEvent . ACTION_MASK ) { case MotionEvent . ACTION_DOWN : mLastMotionEventY = event . getY ( ) ; handled = handleDownEvent ( event ) ; break ; case MotionEvent . ACTION_MOVE : mLastMotionEventY = event . getY ( ) ; handled = handleMoveEvent ( event ) ; break ; case MotionEvent . ACTION_UP : handled = handleUpEvent ( ) ; mLastMotionEventY = - 1 ; break ; case MotionEvent . ACTION_CANCEL : handled = handleCancelEvent ( ) ; mLastMotionEventY = - 1 ; break ; default : handled = false ; break ; } } return handled ; }
Dispatches the {@link android.view.MotionEvent}s to their proper methods if applicable.

@param event the {@code MotionEvent}.

@return {@code true} if the event was handled, {@code false} otherwise.
Dispatches the { @link android . view . MotionEvent } s to their proper methods if applicable .