title: ListView in AlertDialog, stop it from changing height of dialog
body: <p>I've got a custom view set for my AlertDialog with an EditText and ListView.  The EditText acts as a filter for the list.  Right now the whole dialog is resizing based on the contents of the list when the user filters it.  How could I set the list to be a fixed height based on screen size so that it doesn't resize?  For example, have the list always take up 40% of the screen height.  I tried weights but it didn't help.  Here is what I currently have.</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:paddingTop="@dimen/activity_vertical_margin" &gt;
  
      &lt;EditText
          android:id="@+id/EditSearch"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:hint="@string/hint_search" /&gt;
  
      &lt;ListView
          android:id="@+id/list1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>