code: private void triggerOnReleaseActionsWhileVerticalDrag(float yVel) {
      if (yVel < 0 && yVel <= -Y_MIN_VELOCITY) {
        draggableView.maximize();
      } else if (yVel > 0 && yVel >= Y_MIN_VELOCITY) {
        draggableView.minimize();
      } else {
        if (draggableView.isDragViewAboveTheMiddle()) {
          draggableView.maximize();
        } else {
          draggableView.minimize();
        }
      }
    }
docs: Maximize or minimize the DraggableView using the draggableView position and the y axis
  velocity.