I am trying to set up a scrollview in the middle of the screen, in between a header (tablelayout) and a footer (button within ralativelayout).... My problem is that while th
You should take a look to android:layout_weight attribute
I had similar issue, my header was TextView and i had two buttons on the bottom of fixed height each, naturally trying to expand ScrollView to fill rest of the area. android:layout_weight solved problem. basically, i set layout_weight to 0 for header and buttons on the bottom and to 1 for ScrollView. Now it fits perfectly inbetween header and footer.
Hope it helped
P.S. header and footer had "android:height=wrap_content" and ScrollView height was set to "fill_parent"
you might want to try setting in your ScrollView:
android:layout_above="@id/The_RelativeLayout_that_has_your_bottom_button"
android:layout_below="@id/The_one_that_should_be_above_the_scroll_view"
Sorry to be vague, but your xml is very very difficult to read with the formatting as it is right now.
But the idea is, in your ScrollView, you can tell it to be between (or above and below) two other objects. You will need to give those two other objects (the RelativeLayout and maybe a TableRow?) id's so that you can reference those id's in the ScrollView.