title: Toolbar expanding on clicking EditText view
body: <p>I have implemented material navigation drawer and toolbar in MainActivity. For implementing the navigation drawer and to ensure it shows up behind the status bar I have used following code for toolbar.xml</p>
  
  <pre><code>&lt;android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@color/primaryColor"
      android:fitsSystemWindows="true"
      android:theme="@style/ToolbarTheme"&gt;
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p>and included this in activity_main.xml as follows:</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"
      android:id="@+id/navigation_drawer"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;include
          android:id="@+id/toolbar"
          layout="@layout/toolbar" /&gt;
  ........
  </code></pre>
  
  <p>in styles.xml I am using following attribute,</p>
  
  <pre><code>    &lt;item name="android:windowTranslucentStatus"&gt;true&lt;/item&gt;
  </code></pre>
  
  <p>With this everything is working just fine and I get the following result,</p>
  
  <p><a href="https://i.stack.imgur.com/jA8bs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jA8bs.png" alt="enter image description here"></a></p>
  
  <p>The problem occurs when i click on the edit text view (00.00). The moment that edit text view or any edit text view in the page is clicked, the toolbar just expands. See image below:</p>
  
  <p><a href="https://i.stack.imgur.com/rVf0A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rVf0A.png" alt="enter image description here"></a></p>
  
  <p>Now, I was able to rectify the issue by placing <code>android:fitsSystemWindows="true"</code> in activity_main.xml as follows:</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"
      android:id="@+id/navigation_drawer"
      android:layout_width="match_parent"
      android:fitsSystemWindows="true"
      android:layout_height="match_parent"&gt;
  ........
  </code></pre>
  
  <p>My question is, though this solution works but I am not sure as to why do I have to use the same attribute twice in layout file? And what made the toolbar expand? Also, is this the right approach to tackle this issue?</p>
  
  <p>Edit - Removing <code>android:fitsSystemWindows="true"</code> from toolbar.xml and placing it in drawer layout results in the main activity yielding correct results but other activities have a white bar. See image below.</p>
  
  <p><a href="https://i.stack.imgur.com/fSZng.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fSZng.png" alt="enter image description here"></a></p>