LoadingButton.java 文件源码

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

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

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

        float left = width/2 - mRadius + mRadius/2;
        float top = mRadius/2 + mPadding;

        mFailedPath.moveTo(left,top);
        mFailedPath.lineTo(left+mRadius,top+mRadius);

        mFailedPath2.moveTo(width/2 + mRadius/2,top);
        mFailedPath2.lineTo(width/2 - mRadius + mRadius/2,top+mRadius);

        PathMeasure measure = new PathMeasure(mFailedPath, false);
        mFailedPathLength = measure.getLength();
        mFailedPathIntervals = new float[]{mFailedPathLength, mFailedPathLength};

        PathEffect PathEffect = new DashPathEffect(mFailedPathIntervals, mFailedPathLength);
        mPathEffectPaint2.setPathEffect(PathEffect);
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号