private AnimatorListener createSweepAnimatorListener ( ) { return new AnimatorListener ( ) { @ Override public void onAnimationStart ( final Animator animation ) { } @ Override public void onAnimationEnd ( final Animator animation ) { } @ Override public void onAnimationCancel ( final Animator animation ) { } @ Override public void onAnimationRepeat ( final Animator animation ) { appearing = ! appearing ; if ( appearing ) { currentGlobalAngleOffset = ( currentGlobalAngleOffset + MIN_SWEEP_ANGLE * 2 ) % MAX_DEGREES ; } } } ; }
Creates and returns a listener which allows to restart the progress drawable s animation when it has been finished .