public void hide ( long duration , final AnimationListener listener ) { overlay . animate ( ) . alpha ( 0 ) . setDuration ( duration ) . setInterpolator ( interpolator ) . setListener ( new AnimatorListenerAdapter ( ) { @ Override public void onAnimationStart ( Animator animation ) { if ( listener != null ) { listener . onStart ( ) ; } } @ Override public void onAnimationEnd ( Animator animation ) { overlay . setVisibility ( View . GONE ) ; if ( listener != null ) { listener . onEnd ( ) ; } } } ) . start ( ) ; }
Hides the overlay .