I know this is really late but there is a better solution. The problem with the RelativeLayout approach and aligning the buttons to the bottom of the relative layout is that it forces the layout height to essentially be the same as fill_parent (or match_parent).
The proper way to do this is as follows:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">
<!-- Your Scrollview content goes here -->
</ScrollView>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="Button Text Goes Here" />
</LinearLayout>
The key is to set the height to 0 and then give it a layout weight of 1... From what I can tell from reading up on the layout sizing process, giving it a size of 0 and a layout weight causes it to hold off on sizing the view until after it has processed all the children in the layout... It then comes around on a second pass and is able to size the scrollview properly.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…