【发布时间】:2016-05-18 12:07:05
【问题描述】:
开发遗产追踪应用程序!
我需要在左侧有一个导航抽屉和另一个带复选框的导航抽屉。
Left side Drawer 是使用 Android Studio 和我实现的右侧代码生成的。
只有其中一个正在显示。我如何获得右侧的导航视图和左侧的 Fragment Drawer。
下面的 XML
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
>
<include
layout="@layout/app_bar_main"
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="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
<fragment
android:id="@+id/fragment_navigation_drawer"
android:name="org.janastu.dualnavigation.FragmentDrawer"
android:layout_width="@dimen/nav_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="end"
app:layout="@layout/fragment_navigation_drawer"
tools:layout="@layout/fragment_navigation_drawer" />
</android.support.v4.widget.DrawerLayout>
【问题讨论】:
标签: android android-layout android-fragments navigation