code: public void exit(boolean withAnimation) {
          if (GestureDebug.isDebugAnimator()) {
              Log.d(TAG, "Exiting, with animation = " + withAnimation);
          }
  
          if (!isActivated) {
              throw new IllegalStateException("You should call enter(...) before calling exit(...)");
          }
  
          // Resetting 'to' position if not animating exit already
          if (!(isAnimating && position <= toPosition) && position > 0) {
              setToState(toController.getState(), position);
          }
  
          // Starting animation from current position or applying initial state without animation
          setState(withAnimation ? position : 0f, true, withAnimation);
      }
docs: Starts 'exit' animation from {@code to} view back to {@code from}.
  
  @param withAnimation Whether to animate exiting or immediately jump to initial state