title: android navigation view - clipped drawer
body: <p>I follow the <a href="https://www.google.com/design/spec/patterns/navigation-drawer.html" rel="nofollow noreferrer">google drawer spec</a></p>
  
  <p>And I use the default style "NavigationView" class in <code>android-support-design library</code>, the drawer will be the "full-height" style:<br>
  <a href="https://i.stack.imgur.com/ZZcbX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZZcbX.png" alt="enter image description here"></a></p>
  
  <p>But actually I need the "clipped" drawer:<br>
  <a href="https://i.stack.imgur.com/eagD2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eagD2.png" alt="enter image description here"></a></p>
  
  <p>How to make the clipped drawer?
  Any suggestion?</p>
  
  <p>Thanks a lot!</p>
  
  <p><strong>edit:</strong> .xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &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/drawer_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fitsSystemWindows="true" &gt;
  
  &lt;!-- include your content layout --&gt;
  
  &lt;android.support.design.widget.CoordinatorLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/main_content"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical" &gt;
  
          &lt;include layout="@layout/toolbar" /&gt;
  
          &lt;FrameLayout
              android:id="@+id/fragment_container"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_weight="1" &gt;
  
              &lt;fragment
                  android:id="@+id/homepage"
                  android:name="com.technotalkative.navigationviewdemo.MyFragment"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent" /&gt;
          &lt;/FrameLayout&gt;
      &lt;/LinearLayout&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  
  &lt;!-- Navigation view --&gt;
  
  &lt;android.support.design.widget.NavigationView
      android:id="@+id/navigation_view"
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:layout_gravity="start"
      app:headerLayout="@layout/drawer_header"
      android:layout_marginTop="@dimen/topMargin"
      app:menu="@menu/drawer_view" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>