我正在尝试使用Design支持库制作导航抽屉。在我的activity_main中,我编写了以下代码。
当我运行我的应用程序时,它可以工作并显示导航抽屉,但它在状态栏下方而不是上方。我该如何将其移动到状态栏上方?
<?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:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<LinearLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar"/>
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/header_layout"
app:menu="@menu/menu_drawer"/>
</android.support.v4.widget.DrawerLayout>
当我运行我的应用程序时,它可以工作并显示导航抽屉,但它在状态栏下方而不是上方。我该如何将其移动到状态栏上方?