Victor Ferre..
9
例如,如果您有ScrollView中的所有可滚动元素,则应执行以下操作:
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="@style/rootElement"
>
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:orientation="vertical"
style="@style/footer"
android:id="@+id/footer"
android:layout_alignParentBottom="true"
>
请注意,如果您希望修剪页脚,则不应将其放在ScrollView中,其中将放置可滚动内容.使其成为RelativeLayout的子项并设置layout_alignParentBottom为true.在这种情况下,你可能需要在ScrollView的底部添加一个填充(这样最后一个元素不会被页脚隐藏).
这个想法与其他元素相似 ScrollView