private Animator preparePulseAnimation ( ) { AnimatorSet animation = new AnimatorSet ( ) ; Animator firstBounce = ObjectAnimator . ofFloat ( drawable , CircularProgressDrawable . CIRCLE_SCALE_PROPERTY , drawable . getCircleScale ( ) , 0.88f ) ; firstBounce . setDuration ( 300 ) ; firstBounce . setInterpolator ( new CycleInterpolator ( 1 ) ) ; Animator secondBounce = ObjectAnimator . ofFloat ( drawable , CircularProgressDrawable . CIRCLE_SCALE_PROPERTY , 0.75f , 0.83f ) ; secondBounce . setDuration ( 300 ) ; secondBounce . setInterpolator ( new CycleInterpolator ( 1 ) ) ; Animator thirdBounce = ObjectAnimator . ofFloat ( drawable , CircularProgressDrawable . CIRCLE_SCALE_PROPERTY , 0.75f , 0.80f ) ; thirdBounce . setDuration ( 300 ) ; thirdBounce . setInterpolator ( new CycleInterpolator ( 1 ) ) ; animation . playSequentially ( firstBounce , secondBounce , thirdBounce ) ; return animation ; }
This animation will make a pulse effect to the inner circle