如何显示正常和分裂动作条? [英] How to display both normal and split ActionBar?

查看:117
本文介绍了如何显示正常和分裂动作条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有更多然后几个动作条项目,我使用splitActionBarWhenNarrow选项。最新的Gmail应用程序也使用它。但它也有显示未读邮件的数量目前在右上角的自定义项目。当我使用splitActionBar发送我的一切行动项目的底部。我怎么可以把他们中的一些底部,并迫使他们中的一些是在上边。

I have more then a few ActionBar items, and I am using splitActionBarWhenNarrow option. Latest Gmail app also uses it. But it also have a custom item on upper right that shows the current number of unread emails. When I use splitActionBar it sends all my action items to the bottom. How can I send some of them to bottom and force some of them to be in the upper side.

推荐答案

在动作条被分裂(使用安卓uiOptions =splitActionBarWhenNarrow),所有菜单项自动去下吧,但自定义视图仍然可以放在上面。

When the ActionBar is splitted (using android:uiOptions="splitActionBarWhenNarrow"), all menu items automatically go to the bottom bar but custom view can still be put in the top.

View customNav = LayoutInflater.from(this).inflate(R.layout.custom_view, null);
getActionBar().setCustomView(customView);

这篇关于如何显示正常和分裂动作条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆