ScrollView 内的 RelativeLayout,按钮与​​ parent 底部对齐

RelativeLayout inside ScrollView with a button aligned to bottom of its parent

我有一个 RelativeLayout 结构的 "header/body/footer" 风格。

具体结构如下:

<RelativeLayout>
    <TextView />                <!-- the header -->

    <ScrollView>                <!-- the body -->
        <RelativeLayout>
            <!-- other elements -->
        </RelativeLayout>
    </ScollView>

    <Button />                  <!-- the footer -->

</RelativeLayout>

现在,我希望按钮始终位于主按钮 RelativeLayout 的底部,所以我分配了 属性 android:layout_alignParentBottom="true".

另外,ScrollView必须填满所有body,所以属性android:fillViewport="true"已经设置。

问题:事实是页脚中的按钮越过了 ScrollView 的最后一部分,从而隐藏了 [=12= 的最后一个元素] 包含 body。有解决这个问题的方法吗?

尝试设置

android:layout_above="@+id/id_of_your_button"

在滚动视图上