Replace custom visibility extension functions

This commit is contained in:
arkon
2020-07-25 11:55:47 -04:00
parent bdc441a5be
commit 9e51d82154
33 changed files with 187 additions and 230 deletions
@@ -68,26 +68,6 @@ fun View.popupMenu(@MenuRes menuRes: Int, initMenu: (Menu.() -> Unit)? = null, o
popup.show()
}
inline fun View.visible() {
visibility = View.VISIBLE
}
inline fun View.invisible() {
visibility = View.INVISIBLE
}
inline fun View.gone() {
visibility = View.GONE
}
inline fun View.visibleIf(block: () -> Boolean) {
visibility = if (block()) View.VISIBLE else View.GONE
}
inline fun View.toggle() {
visibleIf { visibility == View.GONE }
}
/**
* Shrink an ExtendedFloatingActionButton when the associated RecyclerView is scrolled down.
*