Skip to content

Instantly share code, notes, and snippets.

@enginebai
Last active November 22, 2016 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enginebai/d2f500365fc0a9148b3ed6417b36012a to your computer and use it in GitHub Desktop.
Save enginebai/d2f500365fc0a9148b3ed6417b36012a to your computer and use it in GitHub Desktop.
private void init(Context context, AttributeSet attrs) {
// ...
mArcPaint = new Paint();
mArcPaint.setColor(arcColor);
mArcPaint.setAntiAlias(true);
mArcPaint.setStyle(Paint.Style.STROKE);
mArcPaint.setStrokeWidth(mArcWidth);
mProgressPaint = new Paint();
mProgressPaint.setColor(progressColor);
mProgressPaint.setAntiAlias(true);
mProgressPaint.setStyle(Paint.Style.STROKE);
mProgressPaint.setStrokeWidth(mProgressWidth);
mTextPaint = new Paint();
mTextPaint.setColor(textColor);
mTextPaint.setAntiAlias(true);
mTextPaint.setStyle(Paint.Style.FILL);
mTextPaint.setTextSize(mTextSize);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment