性质 drawerLayout其实是一个控件,跟LinearLayou是=等控件是同一种,只不过带有滑动的功能,只要按DrawerLayout规定的布局方式写完布局,就能有侧滑效果。 通过 android:layout_gravity=”end”来区分左右,end为右,start为左。