/**
* This animation will make a pulse effect to the inner circle
*
* @return Animation
*/
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;
}
MainActivity.java 文件源码
java
阅读 45
收藏 0
点赞 0
评论 0
项目:CircularProgressDrawable
作者:
评论列表
文章目录