0
組み合わせて、これは私が現時点で持っているものである方法:適切に私は両方の要素を使用する必要がNavigationViewとBottomNavigationView
<?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:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<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" />
</android.support.v4.widget.DrawerLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/colorAccent"
app:menu="@menu/menu_bottom" />
</RelativeLayout>
ここに私の問題はBottomNavigationView
は、NavigationView
の前でどれがいけないということです(私はy指数について話している)場合である。私はまたCoordinatorLayout
を代わりに使ってみましたが、BottomNavigationView
がディスプレイの上部に貼り付けられています。
'アンドロイド:layout_alignParentBottom'。 'RelativeLayout'と一緒に行くほうがいい – PYPL