简体   繁体   English

Android操作栏和标签

[英]Android action bar and tabs

在此处输入图片说明

I have implemented ActionBar in my app and I have 3 tabs (Fragments) inside the actionbar. 我已经在我的应用程序中实现了ActionBar,并且在actionbar中有3个标签(片段)。

I want to show options (light blue colored bar in screenshot) with some buttons at the bottom of the screen. 我想在屏幕底部显示一些带有按钮的选项(屏幕截图中的淡蓝色条)。

Can someone guide me about how to implement this? 有人可以指导我如何实施此方法吗?

Thanks 谢谢

to display the actionbar menu items at the bottom add to the activity element in the manifest file this attribute 在底部显示操作栏菜单项,将其添加到清单文件中的活动元素

android:uiOptions="splitActionBarWhenNarrow"

example: 例:

<activity 
android:name=".HomeScreen"
...
...
android:uiOptions="splitActionBarWhenNarrow">

Ok. 好。 I got your question. 我有你的问题。 You can try a tab host for upper tabs and relative layout for the below bar where you can put your stuff. 您可以尝试使用标签主机来显示上方的标签,并在下方的栏中放置相对的布局,以便在其中放置内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM