Implementing my program, I wanted to make the Toolbar disappear by pressing. All is well, he disappears, but he does it abruptly. And I want the disappearance to be smooth, like in ActionBar. How to implement it?

  • A toolbar is a normal View; use any standard animation for its disappearance, which is applied to any View. - pavlofff
  • Not. If you install a toolbar, like supportActionBar, then you cannot call animation for it - Nick

1 answer 1

As noted in the comments for ActionBar, you need to enable animation, which is not enabled by default. Use code:

actionBar.setShowHideAnimationEnabled(boolean enabled);