How do I make DrawerLayout to display below the Toolbar?

前端 未结 7 1100
耶瑟儿~
耶瑟儿~ 2020-11-27 15:01

How to make the drawer layout be below the actionbar/toolbar? I\'m using v7:21 app compat library with the new ToolBar view.

Examples that I see looks like



        
7条回答
  •  星月不相逢
    2020-11-27 15:50

    My solution: generate template with Android Studio 2.1.2, drawer template:

    Only need three changes: set margin top in view NavigationView and delete overloap statusbar in style.xml

    false
    
    android:fitsSystemWindows="false"
    

    layout main.xml set margin top get size actionbar value android:layout_marginTop="?attr/actionBarSize"

    
    
    
        
    
        
    
    
    

提交回复
热议问题