LoadingButton.java 文件源码

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

项目:DxLoadingButton 作者:
private void createSuccessPath(){

        if(mSuccessPath != null){
            mSuccessPath.reset();
        }else{
            mSuccessPath = new Path();
        }

        float mLineWith = 2*mDensity;

        float left = width/2 - mRadius + mRadius/3 + mLineWith;
        float top = mPadding + mRadius/2 + mLineWith;
        float right = width/2 + mRadius - mLineWith - mRadius/3;
        float bottom = (mLineWith + mRadius) * 1.5f + mPadding/2;
        float xPoint = width/2 - mRadius/6;

        mSuccessPath = new Path();
        mSuccessPath.moveTo(left, mPadding+mRadius + mLineWith);
        mSuccessPath.lineTo(xPoint,bottom);
        mSuccessPath.lineTo(right,top);

        PathMeasure measure = new PathMeasure(mSuccessPath, false);
        mSuccessPathLength = measure.getLength();
        mSuccessPathIntervals = new float[]{mSuccessPathLength, mSuccessPathLength};
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号