CoordinatorLayout + AppBarLayout + NavigationDrawer

后端 未结 2 1104
生来不讨喜
生来不讨喜 2020-12-12 15:26

I have a layouting problem when combining CoordinatorLayout with an AppBarLayout and a NavigationDrawer.

The problem is, that

2条回答
  •  长情又很酷
    2020-12-12 16:07

    Your CoordinatorLayout is wrapping your DrawerLayout and NavigationView, which means the Coordinator is in control of how everything is laid out. You need to nest the Coordinator inside the drawer, like so:

    
    
        
    
            
    
    
                
    
            
    
            
    
                
    
            
    
            
    
        
    
        
    
    
    

    That should sort it out!

提交回复
热议问题