How to align BottomNavigationView to the bottom on an activity along with NavigationView? How to align BottomNavigationView to the bottom on an activity along with NavigationView? xml xml

How to align BottomNavigationView to the bottom on an activity along with NavigationView?


Try this:

<?xml version="1.0" encoding="utf-8"?><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">    <RelativeLayout        android:id="@+id/main_content"        android:layout_width="match_parent"        android:layout_height="match_parent">        <include layout="@layout/search_toolbar" />        <android.support.design.widget.BottomNavigationView            android:id="@+id/bottom_navigation_bar"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_alignParentBottom="true"            android:itemBackground="@color/colorPrimary"            app:menu="@menu/bottom_navigation" />    </RelativeLayout>    <android.support.design.widget.NavigationView        android:id="@+id/main_drawer"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:layout_gravity="start"        app:headerLayout="@layout/navigation_header"        app:itemIconTint="#8c000000"        app:itemTextColor="#e6000000"        app:menu="@menu/navigation_menu" /></android.support.v4.widget.DrawerLayout>