Android DrawerLayout (with NavigationView) behind status bar

后端 未结 1 640
旧巷少年郎
旧巷少年郎 2021-01-15 01:22

I have an app with a DrawerLayout that contains a NavigationView:

activity_layout.xml:



        
1条回答
  •  醉梦人生
    2021-01-15 02:11

    Just add true in values-21/styles.xml and remove this @android:color/transparent

    add android:fitsSystemWindows="true" to your NavigationView in xml

    Working example!

    
    

    Result

    Edited (main layout)

    
    
    
        
    
        <--This is mandatory 
    
    
    

    Current Result

    Update: I lookup your style-v21 and found below

    
    
        
    
    

    Please replace it with this

    
    

    0 讨论(0)
提交回复
热议问题