question: private int determineFinalHorizontalLocation ( ) { if ( mGestureState == GESTURE_FLINGING ) { float msRequired = calculateMsRequiredToFlingOffScreen ( ) ; if ( msRequired > MS_DISMISS_FLING_THRESHOLD ) return DRAGGED_CANCEL ; } else if ( mGestureState == GESTURE_SCROLLING ) { float dismissPercentage = DISMISS_SWIPE_THRESHOLD ; float dismissThreshold = getWidth ( ) * dismissPercentage ; if ( Math . abs ( getTranslationX ( ) ) < dismissThreshold ) return DRAGGED_CANCEL ; } return mDragDirection ; }
target:  Determine where the View needs to move.  If the user hasn't tried hard enough to dismiss the View, move it back to the center.