Skip to content

Instantly share code, notes, and snippets.

@akexorcist
Created January 21, 2021 19:21
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 akexorcist/6cb19774aacde756d59bf51a21c29d05 to your computer and use it in GitHub Desktop.
Save akexorcist/6cb19774aacde756d59bf51a21c29d05 to your computer and use it in GitHub Desktop.
Build Coupon UI - Draw the UI with Canvas
class CouponLayout : FrameLayout {
/* ... */
override fun onDraw(canvas: Canvas?) {
super.onDraw(canvas)
canvas?.let { _ ->
canvas.drawPath(backgroundPath, backgroundPaint)
canvas.drawPath(backgroundPath, borderPaint)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment