答案 0 :(得分:0)
打开您的XML文件,在其中定义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"
android:id="@+id/drawer_layout"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:fitsSystemWindows="true">
<include layout="@layout/activity_main_content"/>
<android.support.design.widget.NavigationView
android:theme="@style/NavigationTheme"
android:id="@+id/nav_view"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:layout_gravity="start"
android:fitsSystemWindows="true"
//remove headerlayout line. that is it.
app:headerLayout="@layout/drawer_header"
app:menu="@menu/menu_drawer"/>
</android.support.v4.widget.DrawerLayout>