title: BottomNavigationView overlaying content when using Toolbar with scrolling view behavior
body: <p>I'm having difficulties getting AppBarLayout, NestedScrollView and BottomNavigationView working together properly. My problem is that when I set <code>app:layout_behavior="@string/appbar_scrolling_view_behavior"</code> on the NestedScrollView, it extends behind the BottomNavigationView as illustrated here.
  <a href="https://i.stack.imgur.com/56eaO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/56eaO.png" alt="View in layout editor"></a></p>
  
  <p><a href="https://i.stack.imgur.com/ocQvJ.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ocQvJ.gif" alt="View in app"></a></p>
  
  <p>So the issue is that the BottomNavBar overlays the content, instead of the content stopping at the top of the Nav.</p>
  
  <p>I've tried many solutions, including wrapping the layout in a RelativeLayout and putting the BottomNavView in that instead of the CoordinatorLayout.</p>
  
  <p>Here's the basic layout from the sample project I've attached.</p>
  
  <pre><code>&lt;androidx.coordinatorlayout.widget.CoordinatorLayout 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"
      tools:context="com.example.android.navigationadvancedsample.MainActivity"&gt;
  
      &lt;com.google.android.material.appbar.AppBarLayout
          android:id="@+id/app_bar_layout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          app:elevation="0dp"&gt;
  
          &lt;androidx.appcompat.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              app:layout_scrollFlags="scroll|enterAlways" /&gt;
      &lt;/com.google.android.material.appbar.AppBarLayout&gt;
  
      &lt;androidx.core.widget.NestedScrollView
          android:id="@+id/app_scroll_view"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"
          android:fillViewport="true"&gt;
          &lt;FrameLayout
              android:id="@+id/nav_host_container"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1" /&gt;
      &lt;/androidx.core.widget.NestedScrollView&gt;
  
      &lt;com.google.android.material.bottomnavigation.BottomNavigationView
          android:id="@+id/bottom_nav"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="bottom"
          app:menu="@menu/bottom_nav"/&gt;
  &lt;/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p><a href="https://drive.google.com/file/d/1ccfBxbIFjgUlMjf27UKoU3j0DiX7o9z4/view?usp=sharing" rel="nofollow noreferrer">Here's</a> a small sample project that reproduces the issue (based on the Navigation components sample from Google). Can someone please tell me what I'm doing wrong?</p>