title: Android Transparent status bar and toolbar implementation
body: <p><img src="https://i.stack.imgur.com/TE6Ae.jpg" alt="enter image description here"></p>
  
  <p>Hi I have implemented the toolbar with translucent statusbar set to true. The textview in the toolbar is appearing correctly after padding the status bar height in "onCreate" method. However, the menu items are not aligned properly as shown in the image. </p>
  
  <p>It seems the padding shifted the toolbar correctly but somehow it affected the menu items. What could be the cause and how could we align the menu item in the toolbar with transparent statusbar?</p>
  
  <p>Here is the toolbar in the layout:</p>
  
  <pre><code>    &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="false"
      android:orientation="vertical"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/main_toolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
          app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
          android:background="@drawable/toolbar_bg"&gt;
  &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Toolbar Title"
              android:textColor="@color/white"
              android:textSize="16dp"
              android:layout_gravity="center"
              android:id="@+id/toolbar_title" /&gt;
  
      &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p>In the theme it was set the translucentStatus = true:</p>
  
  <pre><code>&lt;style name="AppThemePink" parent="Theme.AppCompat.Light.NoActionBar"&gt;
  
      &lt;item name="android:windowTranslucentStatus"&gt;true&lt;/item&gt;
      &lt;item name="android:windowTranslucentNavigation"&gt;true&lt;/item&gt;
      &lt;item name="android:clipToPadding"&gt;true&lt;/item&gt; ...
  </code></pre>
  
  <p>In the Activity, onCreate method:</p>
  
  <pre><code>mainToolBar = (Toolbar) findViewById(R.id.main_toolbar);
      setSupportActionBar(mainToolBar);
      mainToolBar.setPadding(0, Util2.getStatusBarHeight(this), 0, 0);
      final ActionBar actionbar = getSupportActionBar();
      actionbar.setDisplayShowTitleEnabled(false);
  </code></pre>