title: Android - transparent toolbar
body: <p>I'm trying to make a transparent toolbar with a hamburger icon for my app menu but the toolbar remains gray with the hamburger icon and my app name.</p>
  
  <p>I would like to be transparent over the map fragment, exactly like Uber app main screen.</p>
  
  <p>This is what I did so far:</p>
  
  <p>styles.xml</p>
  
  <pre><code>&lt;style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
      &lt;item name="android:windowActionBar"&gt;false&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>On manifest I setted the theme:</p>
  
  <pre><code>&lt;application
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme"&gt;
  
  ...
  </code></pre>
  
  <p>activity_main.xml</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_map"
          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_main"
          app:menu="@menu/activity_main_drawer"
          app:itemTextColor="@color/colorTextView"
          android:background="@color/colorLightTextView"/&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>app_bar_map.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=".core.MainActivity"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@android:color/transparent"
          android:theme="@style/AppTheme.AppBarOverlay"
          app:elevation="0dp"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:background="@android:color/transparent"
              android:layout_height="?attr/actionBarSize"
              app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;FrameLayout
          android:id="@+id/fragment_container"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="?android:attr/actionBarSize" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>And on my <code>MainActivity.java</code> on <code>onCreate</code> method:</p>
  
  <pre><code>...
  super.onCreate(savedInstanceState);
  ...
  toolbar = (Toolbar) findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  
  DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
  
  ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
          this, drawer, toolbar, R.string.app_name, R.string.app_name);
  drawer.setDrawerListener(toggle);
  toggle.syncState();
  ...
  </code></pre>