Guest User

Untitled

a guest
Mar 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. private inline fun <T> TextView.updateOrHide(content: T?, action: TextView.(content: T) -> Unit) {
  2. if (content != null) {
  3. visibility = View.VISIBLE
  4. action(content)
  5. } else {
  6. visibility = View.GONE
  7. }
  8. }
Add Comment
Please, Sign In to add comment