How to show/hide BottomAppBar programmatically?

You can use slideUp(...) and slideDown(...) methods from its behavior class. For instance:

Kotlin

 val bottomAppBar = ...
 val behavior = bottomAppBar.behavior as HideBottomViewOnScrollBehavior
 behavior.slideDown(bottomAppBar) // use this to hide it
 behavior.slideUp(bottomAppBar) // use this to show it

Java

 BottomAppBar bottomAppBar = ...
 HideBottomViewOnScrollBehavior behavior = (HideBottomViewOnScrollBehavior) bottomAppBar.behavior;
 behavior.slideDown(bottomAppBar) // use this to hide it
 behavior.slideUp(bottomAppBar) // use this to show it