title: Layout for Fragment overlapping Toolbar
body: <p>Am replacing/placing my Fragments in a FrameLayout inside of a DrawerLayout with this code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;android.support.v4.widget.DrawerLayout      
    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:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start"&gt;
  
  
  &lt;include
      layout="@layout/app_bar_base"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  
  
  &lt;FrameLayout
      android:id="@+id/container"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  
  
  &lt;!--drawer items--&gt;
  &lt;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_base"
      app:menu="@menu/activity_base_drawer" /&gt;
  
   &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p><code>app_bar_base.xml</code> contains a Toolbar and a FAB:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;android.support.design.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"
       android:fitsSystemWindows="true"
       tools:context=".BaseActivity"&gt;
  
  &lt;android.support.design.widget.AppBarLayout
      android:layout_width="match_parent"
      android:id="@+id/appBar"
      android:layout_height="wrap_content"
      android:theme="@style/AppTheme.AppBarOverlay"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:background="?attr/colorPrimary"
          app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  
  
  &lt;android.support.design.widget.FloatingActionButton
      android:id="@+id/fab"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="bottom|end"
      android:layout_margin="@dimen/fab_margin"
      android:src="@android:drawable/ic_dialog_email" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>When I run my app, this is the result:</p>
  
  <p><a href="https://i.stack.imgur.com/k17Ch.png" rel="noreferrer"><img src="https://i.stack.imgur.com/k17Ch.png" alt="enter image description here"></a></p>
  
  <p>As you can see, the layout for the fragment overlaps the Toolbar.How can I fix this?</p>
  
  <p>I've tried placing both the Toolbar and FrameLayout inside a LinearLayout like this:</p>
  
  <pre><code> &lt;LinearLayout
      android:layout_width="match_parent"
      android:orientation="vertical"
      android:layout_height="match_parent"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
          &lt;include
              layout="@layout/app_bar_base"
              android:layout_width="match_parent"
              android:layout_height="match_parent" /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;FrameLayout
          android:id="@+id/container"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>but then the FrameLayout gets hidden.</p>