简体   繁体   English

动作栏中的溢出菜单

[英]overflow menu in actionbar

I'm developing an app both android smartphone and tablet. 我正在开发android智能手机和平板电脑的应用程序。 I'm trying to add the menu button on the actionbar on android tablet (3.x and greater). 我正在尝试在Android平板电脑(3.x及更高版本)的操作栏上添加菜单按钮。 I read some other questions on stackoverflow (like that: How to force use of overflow menu on devices with menu button ) but it is not what i want to. 我阅读了关于stackoverflow的其他一些问题(例如: 如何通过菜单按钮在设备上强制使用溢出菜单 ),但这不是我想要的。

at the moment I'm using the title bar to show the menu button, as you can see in this screen: 此刻,我正在使用标题栏显示菜单按钮,如您在此屏幕中所见: 在此处输入图片说明

And it's a "good" solution but only for version 3.x, because the version 4.x are both for smartphone and tablet, and i don't want to see the title bar because of esthetic reasons. 这是一个“好的”解决方案,但仅适用于3.x版,因为4.x版既适用于智能手机,也适用于平板电脑,并且出于审美原因,我不想看到标题栏。 so I would like to have something like that 所以我想要这样的东西 在此处输入图片说明

any suggestions? 有什么建议么?

This is not possible, except by specifying an android:targetSdkVersion of 10 or less, which at this point in time is not a good idea, as it will make your app look old. 这是不可能的,除非将android:targetSdkVersion指定为10或更小,但在当前时间这不是一个好主意,因为它会使您的应用看起来很旧。

If you do not wish to use an action bar, that is fine, but then you need to create your own menus that are designed to go with your own UI. 如果您不希望使用操作栏,那很好,但是您需要创建自己的菜单,这些菜单旨在与您自己的UI结合使用。

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

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