private AnimationListener createAnimationListener ( final boolean show , final boolean cancel ) { return new AnimationListener ( ) { @ Override public void onAnimationStart ( final Animation animation ) { } @ Override public void onAnimationEnd ( final Animation animation ) { clearAnimation ( ) ; maximized = show ; if ( maximized ) { notifyOnMaximized ( ) ; } else { notifyOnHidden ( cancel ) ; } } @ Override public void onAnimationRepeat ( final Animation animation ) { } } ; }
Creates and returns a listener which allows to handle the end of an animation which has been used to show or hide the view .