title: Overlay toolbar on top of activity content
body: <p>I'm using the AppCompat v21 library to create a Lollipop-like interface in my android app. <br/> So far it's working great.</p>
  
  <p>Now I want to have to toolbar appear on top of my content in one of my activities. <br />
  However, I cannot get it to work. This is what I have so far:</p>
  
  <p><strong>Layout of activity:</strong></p>
  
  <pre><code>&lt;LinearLayout
      android:id="@+id/main_parent_view"
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:theme="@style/myAppTheme"&gt;
      &lt;include layout="@layout/toolbar_setlist_top"/&gt;
      &lt;ImageView
          android:id="@+id/image"
          android:layout_height="match_parent"
          android:layout_width="match_parent"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>Layout of toolbar:</strong></p>
  
  <pre><code>&lt;android.support.v7.widget.Toolbar
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/toolbar"
      app:theme="@style/MyActionBar"
      app:popupTheme="@style/MyActionBar"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:minHeight="?attr/actionBarSize"
      android:layout_marginTop="0dp" /&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Theme:</strong></p>
  
  <pre><code>&lt;resources&gt;
      &lt;style name="myAppTheme" parent="Theme.AppCompat.Light.DarkActionBar"&gt;
          &lt;item name="colorPrimary"&gt;@color/primaryColor&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/primaryColorDark&lt;/item&gt;
          &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
          &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
          &lt;item name="drawerArrowStyle"&gt;@style/DrawerArrowStyle&lt;/item&gt;
          &lt;item name="android:activatedBackgroundIndicator"&gt;@drawable/list_selector&lt;/item&gt;
          &lt;item name="actionBarStyle"&gt;@style/MyActionBar&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle"&gt;
          &lt;item name="spinBars"&gt;true&lt;/item&gt;
          &lt;item name="color"&gt;@android:color/white&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar"&gt;
          &lt;item name="android:background"&gt;@color/primaryColor2&lt;/item&gt;
          &lt;item name="android:windowActionBarOverlay"&gt;true&lt;/item&gt;
          &lt;!-- Support library compatibility --&gt;
          &lt;item name="background"&gt;@color/primaryColor2&lt;/item&gt;
          &lt;item name="windowActionBarOverlay"&gt;true&lt;/item&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_setlist);
      toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
  }
  </code></pre>