У меня есть следующий XML. Я пытаюсь сделать статическую кнопку под моим ScrollView. Я попытался установить вес, установить кнопку ниже scrollview и т.д. Может ли кто-нибудь дать мне способ, чтобы я мог заставить кнопку оставаться внизу, а scrollview занимает только середину экрана?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/menuButtons"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/newItems"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Items" />
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/categories"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Categories" />
</LinearLayout>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/contentScroller"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/menuButtons">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="1" >
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip" >
<ImageView
android:src="@drawable/thumbdrive"/>"
<TextView
android:layout_column="1"
android:text="Thumb Drives"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<ImageView
android:src="@drawable/laptop"/>
<TextView
android:layout_column="1"
android:text="Laptops"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<ImageView
android:src="@drawable/sdcard"/>
<TextView
android:layout_column="1"
android:text="SD Cards"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
<TableRow android:layout_marginTop="5dip"
android:layout_marginBottom="5dip">
<TextView
android:layout_column="1"
android:text="Other"
android:padding="3dip"
android:textSize="20dip"/>
</TableRow>
</TableLayout>
</LinearLayout>
</ScrollView>
<Button
android:id="@+id/submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="Submit New Item"
android:layout_below="@id/contentScroller"/>
</RelativeLayout>