Set slider drawer height
<p>I have a slider drawer in my application. If I set wrap_content as a value for the layout_height field, the slider drawer will stretch on the whole screen. Using a constant as a height is not a good alternative either.
Is it possible to have a slider drawer with the height of it's content?</p>

<p>Thanks in advance!</p>

<pre><code>  &lt;LinearLayout 
  android:layout_width="wrap_content"
  android:layout_height="wrap_content" 
  android:id="@+id/frameLayout" 
  android:layout_gravity="bottom"
  android:orientation="vertical"&gt;
    &lt;View
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_weight="1" 
      android:background="@color/blue"/&gt;
    &lt;SlidingDrawer 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1" 
        android:handle="@+id/handle" 
        android:content="@+id/content"
        android:id="@+id/slide" 
        android:orientation="vertical"&gt;
    &lt;RelativeLayout android:id="@+id/handle"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/list_header"&gt; 
         &lt;TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_centerVertical="true"
            android:layout_marginLeft="@dimen/padding"
            android:textColor="@color/black"
            android:textStyle="bold"
            android:text="@string/ingredients_list_title"/&gt;
         &lt;ImageView
            android:id="@+id/handle_indicator"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_marginRight="@dimen/padding"
            android:src="@drawable/arrow_up"
         /&gt;
    &lt;/RelativeLayout&gt;
    &lt;RelativeLayout android:id="@+id/content"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/list_row_background"&gt;
        &lt;LinearLayout android:id="@+id/list_ant_title"
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:layout_above="@+id/gallery"
             android:orientation="vertical"&gt;
              &lt;ListView 
                android:id="@+id/listview"
                android:layout_width="fill_parent" 
                android:layout_height="wrap_content"
                android:divider="@drawable/divider"
                android:cacheColorHint="@color/transparent"
                android:fadingEdge="none"/&gt;
        &lt;/LinearLayout&gt;
        &lt;Gallery 
            android:id="@+id/gallery"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:layout_alignParentBottom="true"
            android:background="@drawable/list_row_background"/&gt;
    &lt;/RelativeLayout&gt;
&lt;/SlidingDrawer&gt;
</code></pre>

<p></p>
