在我的Android应用程序中,当列表中的项目数量很小时,页脚会粘到列表的末尾,如下所示。
但不是屏幕的结尾。 有什么方法可以把它贴在屏幕的底部。 我正在使用单独的footer.xml并使用Inflator服务调用它。
请分享您宝贵的建议。
提前致谢:)
答案 0 :(得分:0)
使用相对布局并将其与父级底部对齐:
<RelativeLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<YourFooter
android:id="@+id/SomethingSomething"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>