Drawerlayout Key point (I think) is the layout file layout_gravity attribute value, only left and right, two choices, can not slide out from the top, even if there is this effect is not the way out.
<?XML version= "1.0" encoding= "Utf-8"?><Android. Support.v4.widget.DrawerLayout Android:id= "@+id/slidepanellayout"xmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"> <TextViewAndroid:id= "@+id/a"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"Android:text= "a"/> <TextViewAndroid:id= "@+id/b"android:layout_gravity= "End"Android:background= "#0000ff"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"Android:text= "B"/></Android.support.v4.widget.DrawerLayout>
As for the color default is transparent, you must add a color, otherwise it is duplicated.
Drawerlayout Usage of Android