question: void createVerticalSnapAnimation ( boolean visible ) { float translationY = visible ? 0.0f : mTotalHeight ; float yDifference = Math . abs ( translationY - getTranslationY ( ) ) / mTotalHeight ; long duration = ( long ) ( MS_ANIMATION_DURATION * yDifference ) ; createAnimation ( 1.0f , 0 , translationY , duration ) ; }
target:  Create an animation that snaps the View into position vertically.