title: Android fitsSystemWindows not working when replacing fragments
body: <p>I have <code>SingleFramgnetActivity</code> whose purpose is only to hold and replace fragments inside it. </p>
  
  <p>layout looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:gravity="center_horizontal"
      android:orientation="vertical"
      tools:context=".SingleFragmentActivity"
      &gt;
  
      &lt;include layout="@layout/toolbar"/&gt;
  
      &lt;FrameLayout
          android:id="@+id/content"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I'm replacing the <code>Fragments</code> inside the FrameLayout. When I set the <code>fitsSystemWindows</code> to true on the <code>Fragment</code> layout, it is not responding. Actually it is working only when <code>Activity</code> is created, but once I replace the <code>Fragment</code> inside the <code>FrameLayout</code>, the <code>fitsSystemWindows</code> parameter is ignored and the layout is below the status bar and navigation bar. </p>
  
  <p>I found some <a href="https://stackoverflow.com/questions/31190612/fitssystemwindows-effect-gone-for-fragments-added-via-fragmenttransaction">solution</a> with custom FrameLayout which is using deprecated methods, but for some reason it is not working for me (same result as with normal FrameLayout) and I also do not like the idea to use deprecated methods. </p>