@NonNull
    private AnimatorListener createVisibilityAnimationListener(final boolean show) {
        return new AnimatorListenerAdapter() {

            @Override
            public void onAnimationStart(final Animator animation) {
                super.onAnimationStart(animation);

                if (show) {
                    Divider.super.setVisibility(View.VISIBLE);
                }
            }

            @Override
            public void onAnimationEnd(final Animator animation) {
                super.onAnimationEnd(animation);

                if (!show) {
                    Divider.super.setVisibility(View.INVISIBLE);
                }
            }

        };
    }
@ NonNull private AnimatorListener createVisibilityAnimationListener ( final boolean show ) { return new AnimatorListenerAdapter ( ) { @ Override public void onAnimationStart ( final Animator animation ) { super . onAnimationStart ( animation ) ; if ( show ) { Divider . super . setVisibility ( View . VISIBLE ) ; } } @ Override public void onAnimationEnd ( final Animator animation ) { super . onAnimationEnd ( animation ) ; if ( ! show ) { Divider . super . setVisibility ( View . INVISIBLE ) ; } } } ; }
Creates and returns a listener, which allows to observe the progress of an animation, which
is used to show or hide the divider.

@param show
True, if the divider is shown by the animation, false otherwise
@return The listener, which has been created, as an instance of the type {@link
AnimatorListener}. The listener may not be null