Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private inline fun <T> TextView.updateOrHide(content: T?, action: TextView.(content: T) -> Unit) {
- if (content != null) {
- visibility = View.VISIBLE
- action(content)
- } else {
- visibility = View.GONE
- }
- }
Add Comment
Please, Sign In to add comment