public void startAnimation(RectAttribute newCoordinates, Animator.AnimatorListener listener) {
RectAttribute oldCoordinates = new RectAttribute(this.mRoundRect.left, this.mRoundRect.top,
this.mRoundRect.right, this.mRoundRect.bottom, this.mBorderRadius);
ValueAnimator valueAnimator = ValueAnimator.ofObject(new RectAttributeEvaluator(),
oldCoordinates, newCoordinates, oldCoordinates);
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override public void onAnimationUpdate(ValueAnimator animation) {
currentCoordinates = (RectAttribute) animation.getAnimatedValue();
invalidate();
}
});
valueAnimator.addListener(listener);
valueAnimator.setInterpolator(new BounceInterpolator());
valueAnimator.setDuration(2666);
valueAnimator.start();
}
AnimatorShaderRoundImageView.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:AndroidLife
作者:
评论列表
文章目录