title: Frame Layout is Going Behind the Bottom Navigation Bar?
body: <p>I have a frame layout in the activity. I have put an action bar and bottom navigation bar in the activity, but the problem is the frame layout is going behind the bottom navigation bar, and it's also not scrolling. I want the frame layout to always remain above the bottom navigation bar. </p>
  
  <p>I have tried giving the bottom navigation drawer a fixed height of "56dp", and layout_margin Bottom="56dp". It works fine, But I don't think it is a good solution, because in some cases, I want to hide the bottom navigation bar.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          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:background="#fafafa"
          android:orientation="vertical"
          tools:context=".Activities.Dashboard"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="@dimen/abc_action_bar_default_height_material"
              android:background="#ff2729c3"
              app:layout_scrollFlags="scroll|enterAlways"
              app:navigationIcon="@drawable/navigation_icon"
              app:theme="@style/AppTheme.Toolbar"&gt;
  
              &lt;RelativeLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"&gt;
  
                  &lt;ImageView
                      android:layout_width="32dp"
                      android:layout_height="32dp"
                      android:src="@mipmap/app_logo" /&gt;
  
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_alignParentStart="true"
                      android:layout_alignParentTop="true"
                      android:layout_marginStart="38dp"
                      android:layout_marginTop="4dp"
                      android:fontFamily="cursive"
                      android:text="LootBox"
                      android:textColor="@color/white"
                      android:textSize="22sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;ImageView
                      android:layout_width="24dp"
                      android:layout_height="24dp"
                      android:layout_alignParentTop="true"
                      android:layout_alignParentEnd="true"
                      android:layout_marginTop="4dp"
                      android:layout_marginEnd="56dp"
                      android:src="@drawable/pin_posts" /&gt;
  
                  &lt;include
                      layout="@layout/notification_icon_count_badge"
                      android:layout_width="24dp"
                      android:layout_height="24dp"
                      android:layout_alignParentTop="true"
                      android:layout_alignParentEnd="true"
                      android:layout_marginTop="4dp"
                      android:layout_marginRight="16dp" /&gt;
  
              &lt;/RelativeLayout&gt;
  
          &lt;/android.support.v7.widget.Toolbar&gt;
  
          &lt;View
              android:layout_width="match_parent"
              android:layout_height="1dp"
              android:background="#ff9800" /&gt;
  
          &lt;RelativeLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"&gt;
  
  
              &lt;android.support.v4.widget.DrawerLayout
                  android:id="@+id/myDrawer"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"&gt;
  
                  &lt;FrameLayout
                      android:id="@+id/fragment_container_dashboard"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"/&gt;
  
  
                  &lt;include layout="@layout/bottom_nav" /&gt;
  
                  &lt;android.support.design.widget.NavigationView
                      android:id="@+id/nav"
                      android:layout_width="wrap_content"
                      android:layout_height="match_parent"
                      android:layout_gravity="start"
                      android:background="@color/colorPrimary"
                      app:headerLayout="@layout/nav_header"
                      app:itemBackground="@drawable/drawer_item_bg"
                      app:itemIconTint="@color/white"
                      app:itemTextColor="@color/white"
                      app:menu="@menu/my_menu"&gt;
  
                  &lt;/android.support.design.widget.NavigationView&gt;
  
              &lt;/android.support.v4.widget.DrawerLayout&gt;
  
          &lt;/RelativeLayout&gt;
  
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>// Bottom Navigation Bar Code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      xmlns:app="http://schemas.android.com/apk/res-auto"&gt;
  
      &lt;View
          android:layout_width="match_parent"
          android:layout_height="1dp"
          android:layout_above="@+id/bottomNavi"
          android:background="#ff9800"&gt;&lt;/View&gt;
  
      &lt;android.support.design.widget.BottomNavigationView
          android:id="@+id/bottomNavi"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_gravity="bottom"
          android:background="@color/colorPrimary"
          app:itemIconTint="@color/botto_nav_color"
          app:itemTextColor="@color/botto_nav_color"
          app:menu="@menu/bottom_nav_menu"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I want the frame layout to remain below the toolbar and above the bottom navigation bar. </p>
  
  <p>But what happens, is the frame layout is below the toolbar, but the frame layout is behind the bottom navigation bar.</p>