private void init(AttributeSet attrs, int defStyle) {
mFinishWheelPaint = new Paint();
mFinishWheelPaint.setColor(Color.rgb(100, 113, 205));
mFinishWheelPaint.setStyle(Paint.Style.STROKE);// 空心
mFinishWheelPaint.setStrokeCap(Paint.Cap.ROUND);// 圆角画笔
mFinishWheelPaint.setAntiAlias(true);// 去锯齿
mCenterWheelPaint = new Paint();
mCenterWheelPaint.setColor(Color.rgb(243, 243, 243));
mCenterWheelPaint.setStyle(Paint.Style.STROKE);
mCenterWheelPaint.setStrokeCap(Paint.Cap.ROUND);
mCenterWheelPaint.setAntiAlias(true);
mDefaultWheelPaint = new Paint();
mDefaultWheelPaint.setColor(Color.rgb(127, 127, 127));
mDefaultWheelPaint.setStyle(Paint.Style.STROKE);
mDefaultWheelPaint.setStrokeCap(Paint.Cap.ROUND);
mDefaultWheelPaint.setAntiAlias(true);
mTitlePaint = new Paint();
mTitlePaint.setAntiAlias(true);
mTitlePaint.setColor(Color.WHITE);
mStepPaint = new Paint();
mStepPaint.setAntiAlias(true);
mStepPaint.setColor(Color.WHITE);
mTargetPaint = new Paint();
mTargetPaint.setAntiAlias(true);
mTargetPaint.setColor(Color.WHITE);
mAnim = new BarAnimation();
}
@Override
protected void onDraw(Canvas canvas) {
canvas.drawArc(mWheelRect, 0, 359, false, mDefaultWheelPaint);
canv