我没有使用ListView。我必须在屏幕末尾显示页脚文本,而不是在布局的所有项目下。我该怎么做?页尾在屏幕末尾
Q
页尾在屏幕末尾
0
A
回答
0
你可以做这样的事情
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:orientation="horizontal" >
<Button
android:id="@+id/frag1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:text="Button" />
<Button
android:id="@+id/frag2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:text="Button" />
</LinearLayout>
</RelativeLayout>
0
使用线性布局,重量:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/lnrContainer"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
</LinearLayout>
<LinearLayout
android:id="@+id/lnrFooter"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
</LinearLayout>
0
我认为你可以使用的RelativeLayout,并添加layout_alignParentBottom = “true” 将您的页脚视图。
相关问题
- 1. TextView在屏幕末尾被截断
- 2. Selenium error在页面末尾
- 3. iTextSharp - 查找页面末尾
- 4. 语义UI页脚末尾
- 5. 网格视图在屏幕末尾显示图像
- 6. Itextsharp在页面末尾插入页脚
- 7. 在URL末尾处理尾随斜杠
- 8. JavaScript未在页面末尾触发
- 9. 如何在页面末尾加载javascripts
- 10. 把js放在页面的末尾
- 11. telerik kendo和bunble MVC在页面末尾
- 12. 页脚不粘到页面末尾
- 13. 尾行字尾仍然在第一行的末尾给出0920
- 14. 从URL的末尾删除尾部'/'
- 15. android在末尾添加'...'textview
- 16. 可选/在URL的末尾
- 17. 从行的末尾在linux
- 18. MySQL插入在表末尾
- 19. 在文件末尾写入
- 20. Ellipsize TextView在单词末尾
- 21. Сharacter在INPUT的末尾
- 22. 在末尾插入链表
- 23. ¬在vim每行的末尾
- 24. ?在捕获组的末尾
- 25. 写在xml的末尾
- 26. 动态滚动到页面末尾
- 27. 将页面移动到PDF的末尾
- 28. 页面末尾的静态块Magento
- 29. 将边框延伸到页面末尾
- 30. 页面末尾的空白处
使用'FrameLayout'并将'Layout'设置为'gravity =“Bottom”' –
这是一个非常普遍的问题。这表明您在提问之前没有研究过任何问题。如果您尝试搜索而不是直接要求它在SO –
请参阅此链接: http://stackoverflow.com/questions/13277785/how-to-have-a-fixed-footer-with-scrollview-in- android 希望这会有帮助.. – anju