Both the top and bottom navigation hide when scrolling

I am having difficulty figuring out this alone for a few days.

When I scroll down, I want to make both the top and bottom navigation hide, and appear when I scroll up. Can anyone teach me how to do this?

This is the tutorial that I found

and I want to make it like below.

I would appreciate it if someone help me!!
Thank you.

1 Like