code: private boolean handleDrag() {
          if (!isAnimationRunning()) {
              if (dragHelper.hasThresholdBeenReached()) {
                  int margin = Math.round(isMaximized() ? dragHelper.getDragDistance() :
                          initialMargin + dragHelper.getDragDistance());
                  margin = Math.max(Math.max(margin, minMargin), 0);
                  setTopMargin(margin);
              }
  
              return true;
          }
  
          return false;
      }
docs: Handles when a drag gesture is performed by the user.
  
  @return True, if the view has been moved by the drag gesture, false otherwise