定位菜单项的动作条的蜂窝左 [英] Positioning menu items to the left of the ActionBar in Honeycomb

查看:117
本文介绍了定位菜单项的动作条的蜂窝左的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要放置一些菜单项来Honycomb的动作条的左边,但没有发现任何文件展示了如何做到这一点。它看起来像它应该是可能的,因为联系人应用程序具有搜索,导航栏的直接左边。任何想法,如何设置菜单项左侧?

I want to position some menu items to the left of Honycomb's ActionBar, but have found no documentation showing how to do this. It looks like it should be possible since the Contacts app has search to the immediate left of the navigation bar. Any idea as to how to set menu items to the left side?

推荐答案

在动作条具有应用程序图标和常规动作条图标之间的自定义布局的支持。例如:

The ActionBar has support for a custom layout between the application icon and the regular ActionBar icons. Example:

// Set the custom section of the ActionBar with Browse and Search.
ActionBar actionBar = getActionBar();
mActionBarView = getLayoutInflater().inflate(R.layout.action_bar_custom, null);
actionBar.setCustomView(mActionBarView);
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);

这篇关于定位菜单项的动作条的蜂窝左的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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