-1

I'm trying to hide the toolbar by making it invisible while scrolling and visible on stop,but it's not smooth .

Can anyone please suggest any better option for hiding toolbar elegantly while scrolling in relativeLayout

Patrick
  • 331
  • 3
  • 18
  • Possible duplicate of [How to hide ToolBar when i scrolling content up in android](https://stackoverflow.com/questions/35475884/how-to-hide-toolbar-when-i-scrolling-content-up-in-android) – Philio Oct 19 '17 at 15:09

2 Answers2

0

Not sure this is what you want, but this can make the system UI smooth show/hide when scrolling. See Using Immersive Full-Screen Mode

nhoxbypass
  • 9,695
  • 11
  • 48
  • 71
-1

You should use the Coordinator Layout as a parent in the xml file. Coordinator Layout is designed to support this type of actions and "synchronise" this actions.

The is a good tutorial here: https://mzgreen.github.io/2015/06/23/How-to-hideshow-Toolbar-when-list-is-scrolling(part3)/

Marc
  • 19
  • 5