向 ActionBar 添加微调器(不是导航 [英] Adding spinner to ActionBar (not Navigation

查看:21
本文介绍了向 ActionBar 添加微调器(不是导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用答案中的第二个选项向我的 ActionBar 添加了一个微调器 这里 .

I have added a spinner to my ActionBar using the second option from the answer here .

如何向微调器添加微调器适配器?我尝试使用一个 Spinner 对象,因为谷歌描述了 here 但得到一个空的 Spinner 对象.

How to I add a spinner adapter to the spinner? I tried using a Spinner object as Google describes here but get a null Spinner object.

有人知道怎么做吗?我不希望微调器位于操作栏的导航区域中,而是与其他操作项一起(我使用的是拆分操作栏).

Anybody know how to do this? I don't want the spinner to be in the navigation area of the action bar but in with the other action items (I am using the split action bar).

感谢您的帮助!

推荐答案

好吧,我放弃了使用子菜单的 Spinner 想法.我意识到微调器是用来选择一直被选中的东西;子菜单缝合以更好地适应用户界面.

Well, I ditched the Spinner idea for using a submenu. I realized that the spinner was for selecting things that stayed selected; submenus seamed to be a better UI fit.

这篇关于向 ActionBar 添加微调器(不是导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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