How can I implement a chrome like “auto-hide navigation” for my Android app?

后端 未结 4 1717
误落风尘
误落风尘 2021-02-04 20:12

In Chrome, the address bar will be hidden/shown when user swipes up/down the content.

Can I implement the similar logic to my app?



        
4条回答
  •  無奈伤痛
    2021-02-04 20:22

    There is now a really clean way to accomplish this without writing any Java code using the Design Support Library. See Dhir Pratap's answer below:

    (I would have placed this as a comment but I don't have enough rep.)

    How to Hide ActionBar/Toolbar While Scrolling Down in Webview

    
    
        
    
            
        
    
        
    
            
        
    
    

提交回复
热议问题