public void hideButtonInMenu(boolean animate) {
        if (!isHidden() && getVisibility() != GONE) {
            hide(animate);

            Label label = getLabelView();
            if (label != null) {
                label.hide(animate);
            }

            getHideAnimation().setAnimationListener(new Animation.AnimationListener() {
                @Override
                public void onAnimationStart(Animation animation) {
                }

                @Override
                public void onAnimationEnd(Animation animation) {
                    setVisibility(GONE);
                    getHideAnimation().setAnimationListener(null);
                }

                @Override
                public void onAnimationRepeat(Animation animation) {
                }
            });
        }
    }
public void hideButtonInMenu(boolean animate) {
        if (!isHidden() && getVisibility() != GONE) {
            hide(animate);

            Label label = getLabelView();
            if (label != null) {
                label.hide(animate);
            }

            getHideAnimation().setAnimationListener(new Animation.AnimationListener() {
                @Override
                public void onAnimationStart(Animation animation) {
                }

                @Override
                public void onAnimationEnd(Animation animation) {
                    setVisibility(GONE);
                    getHideAnimation().setAnimationListener(null);
                }

                @Override
                public void onAnimationRepeat(Animation animation) {
                }
            });
        }
    }
public void hideButtonInMenu ( boolean animate ) { if ( ! isHidden ( ) && getVisibility ( ) != GONE ) { hide ( animate ) ; Label label = getLabelView ( ) ; if ( label != null ) { label . hide ( animate ) ; } getHideAnimation ( ) . setAnimationListener ( new Animation . AnimationListener ( ) { @ Override public void onAnimationStart ( Animation animation ) { } @ Override public void onAnimationEnd ( Animation animation ) { setVisibility ( GONE ) ; getHideAnimation ( ) . setAnimationListener ( null ) ; } @ Override public void onAnimationRepeat ( Animation animation ) { } } ) ; } }
<b>This will clear all AnimationListeners.</b>
<b > This will clear all AnimationListeners . < / b >