Skip to content

Instantly share code, notes, and snippets.

@2hamed
Created January 1, 2019 11:47
Show Gist options
  • Save 2hamed/d564b4c1dd4f83019590f9cbd96348f4 to your computer and use it in GitHub Desktop.
Save 2hamed/d564b4c1dd4f83019590f9cbd96348f4 to your computer and use it in GitHub Desktop.
private val arcRect = RectF()
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
if (measuredHeight > 0 && measuredWidth > 0) {
...
arcRect.set(0f, 0f, measuredWidth.toFloat(), measuredHeight.toFloat())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment