title: white space between toolbar and status bar
body: <p><a href="https://i.stack.imgur.com/1sh5Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1sh5Y.png" alt="enter image description here"></a></p>
  
  <p>Just so know the listview in the image is fragment generated. But i dont think that should interfere with toolbar's layout. Here is the code for layout - </p>
  
  <pre><code>    &lt;RelativeLayout 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/fragment_songlistview"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/croctooth"
      android:theme="@style/Theme.AppCompat.Light.NoActionBar"
      tools:context="com.shaikhsakib.sounddemo.SongActivity"&gt;
  
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar2"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true"
          android:background="@color/colorPrimary"
          android:minHeight="?attr/actionBarSize"
          app:theme="@style/ThemeOverlay.AppCompat.Dark"
          app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
          /&gt;
  
      &lt;ListView
          android:id="@+id/fragmentSongListView"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@+id/toolbar2" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And here the the corresponding activity to the above layout - </p>
  
  <pre><code>    package com.shaikhsakib.sounddemo;
  
  import android.app.ActionBar;
  import android.app.FragmentManager;
  import android.app.FragmentTransaction;
  import android.os.Bundle;
  import android.support.v7.app.AppCompatActivity;
  import android.support.v7.widget.Toolbar;
  
  public class SongActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_song);
  
          loadFragment();
          Toolbar toolbar2 = (Toolbar) findViewById(R.id.toolbar2);
          setSupportActionBar(toolbar2);
  
      }
  
      private void loadFragment() {
  // create a FragmentManager
          FragmentManager fm;
          fm = getFragmentManager();
  // create a FragmentTransaction to begin the transaction and replace the Fragment
          FragmentTransaction fragmentTransaction = fm.beginTransaction();
  // replace the FrameLayout with new Fragment
          SongListFragment slv = new SongListFragment();
          fragmentTransaction.replace(R.id.songFrameLayout, slv);
          fragmentTransaction.commit(); // save the changes
      }
  }
  </code></pre>
  
  <p>I checked most of the white space toolbar related answers on Stack Overflow but nothing works. Maybe my problem is different.</p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>Here is my Main Activity. It also loads a fragment listview an ha custom toolbar. But no such whitespace here - </p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      loadFragment();
  Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
  
  setSupportActionBar(toolbar);
  
  }
  
  private void loadFragment() {
  // create a FragmentManager
          FragmentManager fm;
          fm = getFragmentManager();
  // create a FragmentTransaction to begin the transaction and replace the Fragment
          FragmentTransaction fragmentTransaction = fm.beginTransaction();
  // replace the FrameLayout with new Fragment
          PLayListFragment flv = new PLayListFragment();
          fragmentTransaction.replace(R.id.frameLayout, flv);
          fragmentTransaction.commit(); // save the changes
      }
  }
  </code></pre>
  
  <p>Also notice that I am replacing the same R.id.frameLayout in both the activities but that should not have anything to do with toolbar. Can anybody tell why its not happening in MainActivity but in other activity.</p>