title: Android: fragment over the app bar
body: <p>I have an app with <code>Navigation Drawer</code> and a fragment with <code>ScrollView</code> and <code>widgets</code>.</p>
  
  <p>The problem is that the fragment widgets are appear over the app bar. Is it possible to adjust the fragment layout so it starts under the app bar?</p>
  
  <p>Thank you in advance!</p>
  
  <p>Screenshot:
  <a href="https://i.stack.imgur.com/xQqSu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xQqSu.png" alt="enter image description here"></a></p>
  
  <p><strong>This is my fragment xml</strong></p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="it.bitrack.fabio.bitrack.AssetView"
      android:id="@+id/assetView_relative_layout"&gt;
  
      &lt;ScrollView
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"
              android:weightSum="1"&gt;
  
              &lt;EditText
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:inputType="textPersonName"
                  android:text="17AB05"
                  android:ems="10"
                  android:id="@+id/assetCode" /&gt;
  
              &lt;Button
                  android:text="Fetch data"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:id="@+id/fetchUpdateButton" /&gt;
  
              &lt;com.github.mikephil.charting.charts.LineChart
                  android:id="@+id/lineChart"
                  android:layout_width="match_parent"
                  android:layout_height="250dp" /&gt;
  
              &lt;TextView
                  android:layout_width="match_parent"
                  android:id="@+id/selectionTextView"
                  android:layout_height="wrap_content"
                  android:text="Nothing selected" /&gt;
  
          &lt;/LinearLayout&gt;
      &lt;/ScrollView&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>This is my activity main xml</strong></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_main"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
      &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="it.bitrack.fabio.bitrack.AssetView"
          android:id="@+id/container"&gt;
      &lt;/RelativeLayout&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_main"
          app:menu="@menu/activity_main_drawer" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p><strong>This is my app bar xml</strong></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="it.bitrack.fabio.bitrack.MainActivity"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:layout_width="match_parent"
          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;include layout="@layout/content_main" /&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"
          app:srcCompat="@android:drawable/ic_dialog_email" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>