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 ; }
Handles when a drag gesture is performed by the user .