This commit is contained in:
2021-06-15 14:24:00 +06:00
parent eba41066b4
commit a411355b4f
11 changed files with 94 additions and 13 deletions

View File

@@ -33,3 +33,15 @@ fun View.toggleVisibility(goneOnHide: Boolean = true) {
show()
}
}
fun View.changeVisibility(show: Boolean = !isShown, goneOnHide: Boolean = true) {
if (show) {
if (goneOnHide) {
gone()
} else {
hide()
}
} else {
show()
}
}