Last active
September 23, 2018 12:19
-
-
Save fievx/aba53f45cc8651df91584ae521d994c0 to your computer and use it in GitHub Desktop.
This file contains 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
findViewById<TextView>(R.id.tv_round_outline).apply { | |
val provider = object : ViewOutlineProvider() { | |
override fun getOutline(view: View, outline: Outline) { | |
outline.setRoundRect(0, 0, view.width, view.height, view.height / 2f) | |
} | |
} | |
outlineProvider = provider | |
clipToOutline = true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment