1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
avtivity_cehua.xml
 
 
<android.support.v4.widget.DrawerLayout xmlns:android=
"http://schemas.android.com/apk/res/android"
    
xmlns:tools=
"http://schemas.android.com/tools"
    
android:id=
"@+id/drawer"
    
android:layout_width=
"match_parent"
    
android:layout_height=
"match_parent"
    
tools:context=
"com.mingle.service.ui.MainActivity"
>
    
<LinearLayout
        
android:layout_width=
"fill_parent"
        
android:layout_height=
"fill_parent"
        
android:orientation=
"vertical"
>
        
<!-- 主布局放这里 -->
        
<include
            
android:layout_width=
"fill_parent"
            
android:layout_height=
"fill_parent"
            
layout=
"@layout/activity_main" 
/>
    
</LinearLayout>
    
<LinearLayout
        
android:id=
"@+id/menuLL"
        
android:layout_width=
"fill_parent"
        
android:layout_height=
"fill_parent"
        
android:layout_gravity=
"start"
        
android:clickable=
"true"
        
android:background=
"@android:color/white"
        
android:orientation=
"vertical"
>
        
<!-- 侧滑布局放这里 -->
        
<include
            
android:layout_width=
"fill_parent"
            
android:layout_height=
"fill_parent"
            
layout=
"@layout/activity_exit" 
/>
    
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
 
 
 
在主区域能左侧滑出来效果