code: @Override public boolean onInterceptTouchEvent(MotionEvent ev) {
      if (!isEnabled()) {
        return false;
      }
      switch (MotionEventCompat.getActionMasked(ev) & MotionEventCompat.ACTION_MASK) {
        case MotionEvent.ACTION_CANCEL:
        case MotionEvent.ACTION_UP:
          viewDragHelper.cancel();
          return false;
        case MotionEvent.ACTION_DOWN:
          int index = MotionEventCompat.getActionIndex(ev);
          activePointerId = MotionEventCompat.getPointerId(ev, index);
          if (activePointerId == INVALID_POINTER) {
            return false;
          }
          break;
        default:
          break;
      }
      boolean interceptTap = viewDragHelper.isViewUnder(dragView, (int) ev.getX(), (int) ev.getY());
      return viewDragHelper.shouldInterceptTouchEvent(ev) || interceptTap;
    }
docs: Override method to intercept only touch events over the drag view and to cancel the drag when
  the action associated to the MotionEvent is equals to ACTION_CANCEL or ACTION_UP.
  
  @param ev captured.
  @return true if the view is going to process the touch event or false if not.