title: How to get a transparent actionbar over viewpager
body: <p>I'm trying to get a transparent actionbar over a viewpager.</p>
  
  <p>I set <code>windowActionBarOverlay</code> to true and the background to      </p>
  
  <pre><code>@android:color/transparent.
  </code></pre>
  
  <p>The top of the viewpager is under the actionBar, but the actionBar is white and not transparent. How can I get the actionBar transparent so the top of the viewpager becomes visible?</p>
  
  <p>I searched everywhere and I can only find answers that say to set windowActionBarOverlay to true and the background tot transparent, but this doesn't seem to work.</p>
  
  <p>My activity extends <code>AppCompatActivity</code> and in onCreate I set a toolbar as actionbar:</p>
  
  <pre><code>  Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
  </code></pre>
  
  <p>The activity xml is:</p>
  
  <pre><code>&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_daily" android:layout_width="match_parent"
      android:layout_height="match_parent" /&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_daily" app:menu="@menu/activity_daily_drawer" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>app_bar_daily xml: </p>
  
  <pre><code>&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=".DailyActivity"&gt;
  
  &lt;android.support.design.widget.AppBarLayout android:layout_height="wrap_content"
      android:layout_width="match_parent" 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_daily" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>content_daily xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.view.ViewPager
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/pager"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  /&gt;
  </code></pre>
  
  <p>styles xml:</p>
  
  <p></p>
  
  <pre><code>&lt;!-- Base application theme. --&gt;
  &lt;!-- Application theme. --&gt;
  &lt;style name="AppTheme" parent="Theme.AppCompat.Light"&gt;
      &lt;item name="android:actionBarStyle"&gt;@style/MyActionBar&lt;/item&gt;
  
      &lt;!-- Support library compatibility --&gt;
      &lt;item name="actionBarStyle"&gt;@style/MyActionBar&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;!-- ACTION BAR STYLES --&gt;
  &lt;style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar"&gt;
      &lt;item name="android:background"&gt;@android:color/transparent&lt;/item&gt;
      &lt;item name="android:windowActionBarOverlay"&gt;true&lt;/item&gt;
  
      &lt;!-- Support library compatibility --&gt;
      &lt;item name="background"&gt;@android:color/transparent&lt;/item&gt;
      &lt;item name="windowActionBarOverlay"&gt;true&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="AppTheme.NoActionBar"&gt;
      &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
      &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /&gt;
  
  
  &lt;style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /&gt;
  </code></pre>
  
  <p></p>