Use animation to hide/show fab (#6385)

This commit is contained in:
Ivan Iskandar
2021-12-26 23:38:35 +07:00
committed by GitHub
parent 733cf99bb4
commit 4c8f5e1f7a
4 changed files with 14 additions and 10 deletions
@@ -159,13 +159,12 @@ open class BrowseSourceController(bundle: Bundle) :
)
filterSheet?.setFilters(presenter.filterItems)
// TODO: [ExtendedFloatingActionButton] hide/show methods don't work properly
filterSheet?.setOnShowListener { actionFab?.isVisible = false }
filterSheet?.setOnDismissListener { actionFab?.isVisible = true }
filterSheet?.setOnShowListener { actionFab?.hide() }
filterSheet?.setOnDismissListener { actionFab?.show() }
actionFab?.setOnClickListener { filterSheet?.show() }
actionFab?.isVisible = true
actionFab?.show()
}
override fun configureFab(fab: ExtendedFloatingActionButton) {
@@ -175,7 +174,7 @@ open class BrowseSourceController(bundle: Bundle) :
fab.setIconResource(R.drawable.ic_filter_list_24dp)
// Controlled by initFilterSheet()
fab.isVisible = false
fab.hide()
initFilterSheet()
}