回答
这在称为split action bar机器人
拆分操作栏提供在屏幕 底部的单独条时显示活性的窄 屏幕上运行的所有行动项目(如面向肖像的手机)。
实物模型显示用突片(左)的操作杆,然后用分裂 动作条(中间);并禁用了应用图标和标题(右图)。
更新:
在新的UI模式被称为bottom toolbar
请参阅this question来创建一个。
注:Android不具有在其行动UI元素图标的文字,截图中的问题似乎是一个混合应用程序,并在回答的建议是最近由本机应用程序的默认UI模式的支持。
截图中显示的内容不是拆分操作栏。例如,分割操作栏在图标下方没有标题。 – CommonsWare
@CommonsWare是的,错过了文字。然而,所有这些都是行为而不是标签。 –
工具栏不支持拆分操作栏。 – Sadiq
是的,你可以使用线性布局。无论你想要什么,只要你让它看起来不错。
诀窍是让它坚持到屏幕的底部。我喜欢在相对布局中包含所有内容,并在相对布局内设置线性布局,并使其与父级的底部对齐。
例如布局:
<RelativeLayout 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">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Button"
android:id="@+id/button1"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Button"
android:id="@+id/button2"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Button"
android:id="@+id/button3"/>
</LinearLayout>
</RelativeLayout>
机器人:layout_alignParentBottom =“true”是这里的重要组成部分,但也有其他办法,使底部的线性布局的住宿。
你可以做这样的事情加在底部栏按钮:
<LinearLayout android:id="@+id/footer" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="horizontal"
android:layout_alignParentBottom="true" style="@android:style/ButtonBar">
<Button android:id="@+id/saveButton" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1"
android:text="@string/menu_done" />
<Button android:id="@+id/cancelButton" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1"
android:text="@string/menu_cancel" />
</LinearLayout>
- 1. 在屏幕底部添加图像/图标
- 2. 添加布局屏幕底部的Android
- 3. Android屏幕截图底部
- 4. Android:添加视图以编程方式在屏幕底部添加视图
- 5. 在屏幕底部有标签的Android?
- 6. CirclePageIndicator屏幕底部
- 7. 从屏幕底部到屏幕顶部裁剪位图150dp
- 8. 在条形图底部添加标签
- 9. Android:按钮在列表视图的底部或屏幕底部
- 10. 添加图标将底部DIV部分
- 11. Android - 屏幕底部的标签
- 12. 如何在表格视图中将静态视图添加到屏幕底部?
- 13. 如何在Qt Nokia屏幕底部的栏上添加按钮?
- 14. 如何将标签添加到小部件屏幕图标?
- 15. 黑莓 - 屏幕底部的加载栏
- 16. 拉伸图像到屏幕底部css
- 17. 在屏幕顶部和底部的LinearLayout
- 18. 部分在屏幕底部(安卓)
- 19. iphone,自动添加主屏幕图标
- 20. Android覆盖屏幕底部
- 21. 屏幕底部或底部的背景图像
- 22. 添加管理员到黑莓屏幕的底部
- 23. 将按钮添加到不滚动屏幕的底部
- 24. 如何将固定按钮和edittext添加到屏幕底部
- 25. Android RelativeLayout添加layout_alignParentBottom将布局推送到屏幕底部
- 26. Bootstrap。如何仅为移动屏幕添加底部边距?
- 27. 关于屏幕底部的i图标的应用程序
- 28. 如何将列表视图标题移动到屏幕底部?
- 29. 在屏幕底部显示选项
- 30. 固定div在手机屏幕底部
它最有可能是水平的LinearLayout – thumbmunkeys
使用Tab主机此 – Sadiq
我把它叫做'footer'。它可以是任何布局(不一定是线性)或任何视图(甚至是自定义的)。 –