This commit is contained in:
lixiaopeng
2020-12-25 16:08:20 +08:00
parent e81c534eae
commit 27b2b045d1

View File

@@ -108,11 +108,11 @@ public class CircleNumberProgress extends View {
paintDone.setAntiAlias(true);
paintDone.setStyle(Paint.Style.STROKE);
float[] pos = {0f, 0.5f, 1.0f};
SweepGradient linearGradient = new SweepGradient((getMeasuredWidth() - 40)/2,(getMeasuredHeight() - 40)/2,
new int[]{(Color.parseColor("#B3ffffff")), Color.parseColor("#F2ffffff")}, null);
// SweepGradient linearGradient = new SweepGradient((getMeasuredWidth())/2,(getMeasuredHeight())/2,new int[]{Color.GREEN, Color.WHITE}, null);
new int[]{Color.parseColor("#ffffff"), Color.parseColor("#B3ffffff"), Color.parseColor("#ffffff")}, pos);
// SweepGradient linearGradient = new SweepGradient((getMeasuredWidth() -40)/2,(getMeasuredHeight() - 40)/2,new int[]{Color.GREEN, Color.RED, Color.YELLOW, Color.WHITE, Color.BLUE}, pos);
Matrix matrix = new Matrix();
matrix.setRotate(180, getMeasuredWidth()/2, getMeasuredHeight()/2);
linearGradient.setLocalMatrix(matrix);