【发布时间】:2018-03-31 21:05:56
【问题描述】:
我一直在努力让我的导航抽屉出现在操作栏下方。我知道这可能不符合设计指南。 我访问了有关该主题的其他几个线程(例如:Navigation drawer below Actionbar),但没有解决我的问题。
经过大量的修补,我没有走得更远。请帮忙解决这个问题。
目前情况: https://i.stack.imgur.com/HK1qW.png
布局/activity_spellbook.xml
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_spellbook"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="left|start"
android:fitsSystemWindows="false"
app:headerLayout="@layout/nav_header_spellbook"
app:menu="@menu/activity_spellbook_drawer" />
</android.support.v4.widget.DrawerLayout>
</FrameLayout>
【问题讨论】:
标签: android layout android-actionbar navbar