//---------------------------------------------都是xml里的-----------------------------------------
//整个布局用android.support.v4.widget.DrawerLayout来包住
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
// --------------------------------------主页面的布局---------------------------------------
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>
//-----------------------------------------侧拉页面的布局----------------------------------------
<LinearLayout
android:background="#0f0"
android:layout_gravity="left"
android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
侧拉
最新推荐文章于 2021-11-04 08:32:36 发布