Last active
May 3, 2020 11:22
-
-
Save shkcodes/d8b505b8fc8d8005008e4e63936346db to your computer and use it in GitHub Desktop.
draw_circle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onDraw(canvas: Canvas) { | |
super.onDraw(canvas) | |
canvas.drawCircle(centerX, centerCircleY, radius, circlePaint) | |
val textCenterY = centerY - ((textPaint.descent() + textPaint.ascent()) / 2) | |
canvas.drawText(label, centerX, textCenterY, textPaint) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment