title: Navigation Drawer not occupying the entire screen height
body: <p>I have a drawer layout with drawer on left. </p>
  
  <p>Drawer has a button on click of which I want to replace the view of the drawer with a new view. <strong>The problem is , when new view gets replaced it doesn’t occupy the entire screen height.</strong></p>
  
  <p>To illustrate I have given a background colour to my navigation drawer views.</p>
  
  <p>I want the Green view to occupy the entire screen height. Copy-paste the code below to get going:
  <strong>MainActivity.java</strong></p>
  
  <pre><code>public class MainActivity extends Activity {
  LayoutInflater inflater;
  DrawerLayout drawer;
  RelativeLayout parentRL;
  RelativeLayout viewToBeRemovedRL;
  View viewToBeAdded;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      setContentView(R.layout.main_activity);
      inflater = (LayoutInflater) this
              .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
      parentRL = (RelativeLayout) findViewById(R.id.parentRL);
      viewToBeRemovedRL = (RelativeLayout) findViewById(R.id.viewToBeReplaced);
  }
  
  public void onRemoveView(View view) {
      viewToBeAdded = inflater.inflate(R.layout.add_view, null);
      viewToBeRemovedRL.setVisibility(View.GONE);
      parentRL.addView(viewToBeAdded);
  }
  
  public void onOpenDrawer(View view) {
      drawer.openDrawer(parentRL);
  }
  }
  </code></pre>
  
  <p><strong>main_activity.xml</strong></p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/drawer_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent" &gt;
  
  &lt;RelativeLayout
      android:id="@+id/leftRL"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;Button
          android:layout_width="wrap_content"
          android:layout_height="75dp"
          android:onClick="onOpenDrawer"
          android:text="Open Drawer" /&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;RelativeLayout
      android:id="@+id/parentRL"
      android:layout_width="290dp"
      android:layout_height="match_parent"
      android:layout_gravity="left" &gt;
  
      &lt;RelativeLayout
          android:id="@+id/viewToBeReplaced"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="#FF0000" &gt;
  
          &lt;Button
              android:layout_width="100dp"
              android:layout_height="75dp"
              android:onClick="onRemoveView"
              android:text="Change View" /&gt;
      &lt;/RelativeLayout&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p><strong>add_view.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="290dp"
  android:layout_height="match_parent"
  android:orientation="vertical"
  android:background="#00FF00" &gt;
  
  &lt;TextView 
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_marginTop="100dp"
  android:text="New view"
  /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>