I have something like to this:
I want that when the relative_layout stretch to fill the screen, stretch layout_content (layout_header and layout_footer not resize). And when the screen size is smaller than layouts then scrool
My code currently looks like this:
<ScrollView android:layout_width="fill_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/layout_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
...
</LinearLayout>
<LinearLayout
android:id="@+id/layout_center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_below="@+id/layout_header">
...
</LinearLayout>
<LinearLayout
android:id="@+id/layout_footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_below="@+id/layout_center">
...
</LinearLayout>
</RelativeLayout >
</ScrollView>
Excuse my english, thank you very much. I Wear long time without this fix and have tried with different layout.