【发布时间】:2015-01-15 02:34:45
【问题描述】:
我正在尝试让导航抽屉在工具栏下方打开。
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/drawer_layout"
tools:context=".MainActivity">
<RelativeLayout
android:layout_width = "match_parent"
android:layout_height = "wrap_content">
<include layout="@layout/toolbar"
android:id="@+id/toolbar"/>
<FrameLayout
android:layout_below="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_color"/>
</RelativeLayout>
<ListView
android:id="@+id/drawer"
android:layout_width="260dp"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar"
android:layout_marginTop="56dp"
android:layout_gravity="start">
</ListView>
</android.support.v4.widget.DrawerLayout>
如何重新格式化 xml,以便在工具栏下方打开导航栏?
【问题讨论】:
-
@tyczj 如果您查看最新版本的 Google Play 商店。导航抽屉位于工具栏下方。我想实现类似的东西。
-
@tyczj 导航栏打开时如何处理工具栏操作
-
你没有,如果你有想要用户在抽屉打开时执行的操作,那么你应该把它们放在抽屉布局中
标签: android navigation-drawer android-toolbar