``` switch (ev.getAction()) { case Motio...
# getting-started
r
Copy code
switch (ev.getAction()) {
      case MotionEvent.ACTION_UP:
      case MotionEvent.ACTION_POINTER_UP:
        // If we still have enough touches, we don’t need to reset state
        if (ev.getPointerCount() > fingersRequired) {
          break;
        }
      case MotionEvent.ACTION_CANCEL:
        // reset all the things if we're in progress
        if (inProgress) {
          resetState();
          return listener.onMoveEnded(this);
        }
        break;
    }