How do I use DrawerLayout to display over the ActionBar/Toolbar and under the status bar?

后端 未结 10 1072
[愿得一人]
[愿得一人] 2020-11-22 04:05

I\'ve seen in the new material design Side Nav spec that you can display the drawer over the action bar and behind the status bar. How can I implement this?

10条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 04:45

    Instead of using the ScrimInsetsFrameLayout... Isn't it easier to just add a view with a fixed height of 24dp and a background of primaryColor?

    I understand that this involves adding a dummy view in the hierarchy, but it seems cleaner to me.

    I already tried it and it's working well.

    
    
        
    
            
            
    
            
    
            
    
        
    
        
    
    
    

提交回复
热议问题