title: Relative Layout, SlidingDrawer and ListView
body: <p>I am trying to build a ListView Activity with a toolbar at the top. The rightmost tool in this toolbar will be a handler to a horizontal SlidingDrawer which will provide a sliding EditText on top of the other tools.
  First I tried to achieve this with LinearLayout and FrameLayout but the slider went as much as the space that was available minus the tools total width. Right now I have done what I want and works great with the following layout:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"&gt;
  &lt;RelativeLayout android:id="@+id/laytoptoolbarhost"
      android:layout_width="fill_parent"
      android:layout_height="55dip"
      android:background="@drawable/toptoolbar_gradient"
      android:padding="5dip"&gt;
      &lt;View android:id="@+id/tool10"
          android:layout_width="32dip"
          android:layout_height="32dip"
          android:paddingRight="3dip"
          android:background="#00FF00"
          android:layout_alignParentLeft="true"
          android:layout_centerVertical="true"&gt;
      &lt;/View&gt;     
      &lt;View android:id="@+id/tool20"
          android:layout_width="32dip"
          android:layout_height="32dip"
          android:paddingRight="3dip"
          android:background="#00FF00"
          android:layout_toRightOf="@+id/tool10"
          android:layout_centerVertical="true"&gt;
      &lt;/View&gt;
      &lt;View android:id="@+id/tool30"
          android:layout_width="32dip"
          android:layout_height="32dip"
          android:paddingRight="3dip"
          android:background="#00FF00"
          android:layout_toRightOf="@+id/tool20"
          android:layout_centerVertical="true"&gt;
      &lt;/View&gt;             
      &lt;SlidingDrawer android:id="@+id/slidesearch"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:layout_alignParentRight="true"
          android:layout_centerVertical="true"
          android:handle="@+id/sliderhandle"
          android:content="@+id/txtsearch"&gt;
          &lt;ImageView android:id="@+id/sliderhandle"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/btn_collapse_states"&gt;
          &lt;/ImageView&gt;
          &lt;EditText android:id="@+id/txtsearch"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:textSize="20sp"&gt;
          &lt;/EditText&gt;
      &lt;/SlidingDrawer&gt;
  &lt;/RelativeLayout&gt;
  &lt;ListView android:id="@id/android:list"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_weight="1"
             android:drawSelectorOnTop="false"/&gt;
   &lt;TextView android:id="@id/android:empty"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:gravity="center"
             android:textSize="20sp"
             android:text="@string/lbl_norecords"/&gt;    
  </code></pre>
  
  <p></p>
  
  <p>The problem is that I have to put a fixed value in RelativeLayout android:layout_height parameter in order for this to work. If I place "wrap_content" then the RelativeLayout fills the entire screen and nothing else is showing.</p>
  
  <p>Any help on this is highly appreciated</p>
  
  <p>Thank you in advance</p>