在布局文件中添加SlidingDrawer
<SlidingDrawer
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:id="@+id/drawer"
android:content="@+id/myView"
android:handle="@id/layout"
android:orientation="horizontal"
android:layout_width="300dp"
android:layout_height="500dp">
<LinearLayout
android:background="@android:color/holo_red_dark"
android:orientation="vertical"
android:gravity="center"
android