public void hideWithAnimationWithListener ( Animator . AnimatorListener animatorListener ) { scrollDirection = SCROLL_TO_BOTTOM ; ObjectAnimator objectAnimator = objectAnimatorFactory . getObjectAnimator ( animatedView , ANIMATION_TYPE , animatedView . getHeight ( ) ) ; if ( animatorListener != null ) { objectAnimator . addListener ( animatorListener ) ; } objectAnimator . setDuration ( durationInMillis ) ; objectAnimator . start ( ) ; }
Hide the animated view using a translationY animation and configure an AnimatorListener to be notified during the animation .