我正在创建一个应用程序,我想在应用程序中有一个导航抽屉和一个底部栏。
我认为我正在寻找一个好方法,但是我可以在显示导航抽屉时做到这一点,这不在底部栏上方,它在后面,所以我该怎么做?我需要底部栏的导航抽屉。
这是我的代码,希望你能帮助我,谢谢nn
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
layout="@layout/include_list_viewpager" />-
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_height="match_parent"
android:layout_width="300dp"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header"
app:menu="@menu/drawer_view" />
</android.support.v4.widget.DrawerLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:itemBackground="@color/colorPrimaryRed"
app:itemTextColor="@drawable/nav_item_color_state"
app:itemIconTint="@drawable/nav_item_color_state"
app:menu="@menu/navigation" />
</RelativeLayout>