<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. --> <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_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.casic.mapcollector.activity.MainActivity"> <!-- As the main content view, the view below consumes the entire space available using match_parent in both dimensions. --> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal"> <EditText android:id="@+id/text_title" android:layout_width="wrap_content" android:layout_height="50.0dip" android:layout_weight="6.0" android:background="?colorPrimary" android:enabled="false" android:gravity="center" android:text="管线自动上图系统" android:textColor="@color/white" android:textSize="22.0sp" android:textStyle="bold" /> </LinearLayout> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android:minHeight="?attr/actionBarSize" android:visibility="gone" /> <!--app:theme="@style/NoIconActionbar"--> <FrameLayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" /> </LinearLayout> </android.support.v4.widget.DrawerLayout>