navigation header layout cutoff from top
<p>i am using navigation view with expandable listview. i am adding header layout programmatically. but it cut off from top. if i give header layout height to 240dp than it looks ok but in lower version it take to much height. heres my header layout xml which i am inflating to header of expandable listview.</p>

<p>navigation_header</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="@color/colorPrimary"
              android:gravity="bottom"
              android:orientation="vertical"
              android:paddingBottom="@dimen/activity_vertical_margin"
              android:paddingLeft="@dimen/activity_horizontal_margin"
              android:paddingRight="@dimen/activity_horizontal_margin"
              android:paddingTop="@dimen/activity_vertical_margin"
    &gt;

    &lt;com.lib.CircleImageView
        android:id="@+id/imageViewHeaderPerson"
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:paddingTop="@dimen/nav_header_vertical_spacing"
        android:src="@android:drawable/sym_def_app_icon"/&gt;

    &lt;TextView
        android:id="@+id/textViewName"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="@dimen/nav_header_vertical_spacing"
        android:text="Android Studio"
        android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
        android:textColor="@color/DEFAULT"/&gt;

    &lt;TextView
        android:id="@+id/textViewCode"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        style="@style/Base.TextAppearance.AppCompat.Body1"
        android:text="heelo"
        android:textColor="@color/DEFAULT"/&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>and my navigation layout having drawer</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;android.support.v4.widget.DrawerLayout
    android:id="@+id/drawer_layout"
    xmlns:android="http://schemas.android.com/apk/res/android"
    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;FrameLayout
            android:id="@+id/content_frame"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
           /&gt;

    &lt;/LinearLayout&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"
        &gt;
    &lt;ExpandableListView
        android:groupIndicator="@null"
        android:id="@+id/left_drawer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:headerDividersEnabled="false"
        android:childDivider="#00000000"


       /&gt;
    &lt;/android.support.design.widget.NavigationView&gt;

&lt;/android.support.v4.widget.DrawerLayout&gt;
</code></pre>