Relative layout on a TabHost?
<p>I have an Android UI issue that I am not quite sure how to solve.  I have a tabhost with a couple of different items on it.  In one case, the fields added to a scrollView (which is on one of the tabs) will be added dynamically. I have a button at the bottom of the screen, using a relative layout.  The problem is that the scrollview (and the other tab's linear layout) extend beyond the bottom button.  This results in the final field on the screen being unviewable, as it is hidden by the button.  Here is a screenshot of the issue as well as the xml for my layouts. Any help is greatly appreciated.<img src="http://i.stack.imgur.com/P3DLX.png" alt="enter image description here"></p>

<p><strong>The main layout:</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/background_nologo" &gt;

&lt;LinearLayout 
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dp" &gt;

&lt;TabWidget android:id="@android:id/tabs"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true" /&gt;

&lt;View android:layout_width="fill_parent"
    android:layout_height="2dip"/&gt;

&lt;FrameLayout
    android:id="@android:id/tabcontent"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;

&lt;include layout="@layout/mc_message_send_tab_details"/&gt;

&lt;!-- Scrollview for message data --&gt;
&lt;ScrollView android:layout_width="fill_parent" 
    android:layout_height="fill_parent"
    android:scrollbars="vertical"
    android:id="@+id/formTab"&gt;

&lt;!-- Form fields are automatically 
    created in McMessageViewActivity. --&gt;
&lt;LinearLayout android:id="@+id/formLayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" &gt;

    &lt;View android:layout_width="fill_parent"
    android:layout_height="5dip"/&gt;

&lt;/LinearLayout&gt;
&lt;/ScrollView&gt;

&lt;/FrameLayout&gt;

&lt;/LinearLayout&gt;

&lt;RelativeLayout android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;      
&lt;LinearLayout android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:layout_alignParentBottom="true" &gt;
    &lt;Button android:text="Send" 
        android:id="@+id/btnSend" android:layout_weight="1" 
        android:layout_height="wrap_content" android:layout_width="0px"/&gt;
&lt;/LinearLayout&gt;
&lt;/RelativeLayout&gt;

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

<p><strong>The additional Tab Layout:</strong></p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"
    android:id="@+id/detailsTab"&gt;

    &lt;TableLayout android:layout_width="fill_parent"
       android:layout_height="fill_parent"
       android:stretchColumns="1"&gt;

        &lt;View android:layout_width="fill_parent"
            android:layout_height="10dip"/&gt;

       &lt;TableRow&gt;
           &lt;TextView
               android:text="Unit #"
               android:textStyle="bold"
               android:gravity="right"
               android:padding="3dip" /&gt;
           &lt;Spinner android:id="@+id/unitNumber"
               android:text=""
               android:padding="3dip"
               android:layout_marginRight="2sp"/&gt;
       &lt;/TableRow&gt;
       &lt;TableRow&gt;
           &lt;TextView
               android:text="User ID"
               android:textStyle="bold"
               android:gravity="right"
               android:padding="3dip" /&gt;
           &lt;EditText android:id="@+id/userId"
               android:text=""
               android:padding="3dip"
               android:layout_marginRight="2sp" /&gt;
       &lt;/TableRow&gt;
       &lt;TableRow&gt;
           &lt;TextView
               android:text="Form #"
               android:textStyle="bold"
               android:gravity="right"
               android:padding="3dip" /&gt;
           &lt;Spinner android:id="@+id/formNumber"
               android:text=""
               android:padding="3dip"
               android:layout_marginRight="2sp" /&gt;
       &lt;/TableRow&gt;
       &lt;TableRow&gt;
           &lt;TextView
               android:text="Sending status"
               android:textStyle="bold"
               android:gravity="right"
               android:padding="3dip" /&gt;
           &lt;EditText android:id="@+id/sendingStatus"
               android:text=""
               android:padding="3dip"
               android:layout_marginRight="2sp"/&gt;
       &lt;/TableRow&gt;
       &lt;TableRow&gt;
           &lt;TextView
               android:text="Delivery priority"
               android:textStyle="bold"
               android:gravity="right"
               android:padding="3dip" /&gt;
           &lt;EditText android:id="@+id/priority"
               android:text=""
               android:padding="3dip"
               android:layout_marginRight="2sp"/&gt;
       &lt;/TableRow&gt;
       &lt;TableRow&gt;
           &lt;TextView
               android:text="Request reply"
               android:textStyle="bold"
               android:gravity="right"
               android:padding="3dip" /&gt;
           &lt;CheckBox android:id="@+id/requestReply"
               android:padding="3dip"
               android:layout_marginRight="2sp" /&gt;
       &lt;/TableRow&gt;
       &lt;TableRow&gt;
           &lt;TextView
               android:text="Receipt conf"
               android:textStyle="bold"
               android:gravity="right"
               android:padding="3dip" /&gt;
           &lt;CheckBox android:id="@+id/receiptConfirmation"
               android:padding="3dip"
               android:layout_marginRight="2sp" /&gt;
       &lt;/TableRow&gt;

    &lt;/TableLayout&gt;   

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