title: How to add a SearchView into a navigation drawer?
body: <p>I develop a navigation drawer with expandable list view, like this</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;!-- The main content view --&gt;
      &lt;fragment 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:id="@+id/map" tools:context=".HomeActivity"
          android:name="com.google.android.gms.maps.SupportMapFragment" /&gt;
  
      &lt;!-- The navigation drawer--&gt;
      &lt;ExpandableListView android:id="@+id/left_drawer"
          android:layout_width="240dp"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          android:choiceMode="singleChoice"
          android:divider="@android:color/transparent"
          android:dividerHeight="0dp"
          android:background="#111"
          android:listSelector = "@drawable/selector_list_item"&gt;
      &lt;/ExpandableListView&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>I want to add a <code>SearchView</code> into the navigation drawer, so I add it into the <code>ExpandableListView</code></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;!-- The main content view --&gt;
      &lt;fragment 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:id="@+id/map" tools:context=".HomeActivity"
          android:name="com.google.android.gms.maps.SupportMapFragment" /&gt;
  
      &lt;!-- The navigation drawer--&gt;
      &lt;ExpandableListView android:id="@+id/left_drawer"
          android:layout_width="240dp"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          android:choiceMode="singleChoice"
          android:divider="@android:color/transparent"
          android:dividerHeight="0dp"
          android:background="#111"
          android:listSelector = "@drawable/selector_list_item"&gt;
          &lt;SearchView android:id="@+id/sv"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"/&gt;
      &lt;/ExpandableListView&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>I got a error</p>
  
  <pre><code>java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
  </code></pre>
  
  <p>Thanks</p>