Use a RelativeLayout and organize it like this:
<?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="fill_parent" android:orientation="vertical" > <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_alignParentTop="true" android:layout_above="@+id/linearLayoutThatDoesNotScroll" > <LinearLayout android:id="@+id/linearLayoutWithLotofContent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > </LinearLayout> </ScrollView> <LinearLayout android:id="@+id/linearLayoutThatDoesNotScroll" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" > </LinearLayout> </RelativeLayout>
The focus is on the ScrollView, while at the same time it is aligned with the top of the screen AND above the bottom fixed LinearLayout. It just works.
source share