Change top bar visible when swipe in webview

Hi guys, I’m creating a browser using a custom webview, but how can I remove the top bar when swiping up in a custom webview, and when swiping down, the top bar was shown

same thing i want like it is on professional browsers