Skip to content

Instantly share code, notes, and snippets.

@2hamed
Created January 1, 2019 11:47
Show Gist options
  • Save 2hamed/e9cf81b00cbf69b87faad2d8242bf07b to your computer and use it in GitHub Desktop.
Save 2hamed/e9cf81b00cbf69b87faad2d8242bf07b to your computer and use it in GitHub Desktop.
override fun onDraw(canvas: Canvas) {
when (mode) {
Mode.Loading -> {
canvas.drawArc(arcRect, 0f, 360f * (progress.toFloat() / 100f), true, outerPaint)
canvas.drawCircle(cx, cy, radius - radiusDiff, innerPaint)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment