private boolean handleDrag(){
  if (!isAnimationRunning()) {
    if (dragHelper.hasThresholdBeenReached()) {
      int margin=Math.round(isMaximized() ? dragHelper.getDistance() : initialMargin + dragHelper.getDistance());
      margin=Math.max(Math.max(margin,minMargin),0);
      setTopMargin(margin);
    }
    return true;
  }
  return false;
}

private boolean handleDrag ( ) { if ( ! isAnimationRunning ( ) ) { if ( dragHelper . hasThresholdBeenReached ( ) ) { int margin = Math . round ( isMaximized ( ) ? dragHelper . getDistance ( ) : initialMargin + dragHelper . getDistance ( ) ) ; margin = Math . max ( Math . max ( margin , minMargin ) , 0 ) ; setTopMargin ( margin ) ; } return true ; } return false ; }
handles when a drag gesture is performed by the user .
