layout_heightに0dp、layout_weightを1にするだけ。
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="10dp">
<View
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<View
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="10dp">
</LinearLayout>