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);
}
LoadingButton.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:DxLoadingButton
作者:
评论列表
文章目录