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();
	}
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();
	}
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.

@param duration Duration of the animation in milliseconds. Use 0 for no animation.
@param listener Listener for animation events.
Hides the overlay .