RoundProgressView.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:SmartRefresh 作者:
private void initView() {
    mPath = new Paint();
    mPantR = new Paint();
    mPath.setAntiAlias(true);
    mPantR.setAntiAlias(true);
    mPath.setColor(Color.WHITE);
    mPantR.setColor(0x55000000);

    DensityUtil density = new DensityUtil();
    mRadius = density.dip2px(20);
    mOutsideCircle = density.dip2px(7);
    mPath.setStrokeWidth(density.dip2px(3));
    mPantR.setStrokeWidth(density.dip2px(3));

    mAnimator = ValueAnimator.ofInt(0,360);
    mAnimator.setDuration(720);
    mAnimator.addUpdateListener(animation -> {
        endAngle = (int) animation.getAnimatedValue();
        postInvalidate();
    });
    mAnimator.setRepeatCount(ValueAnimator.INFINITE);
    mAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号