安卓蜂巢菜单按钮目标 [英] android honeycomb menu button target

查看:107
本文介绍了安卓蜂巢菜单按钮目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让我的应用程序是向后兼容的,所以我需要显示菜单按钮 因为我们使用了我们的previous版本的应用程序菜单按钮。

I am trying to get my app to be backward compatible so i need to show the menu button since we used the menu button in our app on previous versions.

所以,我读,它说,如果你的目标是11(3.0),比你没有得到菜单按钮,但你的目标是10,他们这样做。

So I was reading and it says that if your target is 11 (3.0) than you don't get the menu button but it your target is 10 they you do.

但问题是我使用的片段,我的目标必须是11

But the issue is I am using fragments so my target has to be 11.

任何想法。

推荐答案

普通的菜单选项将显示,无论Android版本。如果你有:

Ordinary options menus will appear regardless of Android version. If you have:

android:targetSdkVersion="11"

然后在选项菜单中会出现在Android 3.0+设备的操作栏。在选项菜单中的所有项目点击在右上角的溢出按钮后,将可用。您的选项菜单,通常会出现在Android 1.x和2.x的设备,即使你有安卓targetSdkVersion =11&LT ;使用-SDK> 清单元素

如果你推翻MENU键有其他行为,您将需要创建一些其他触发的API级别11或更高的行为。覆盖MENU按钮是永远不会开始一个好主意,因为你可以看到,它甚至更少的好主意了。我知道没有办法让一个Android 3.0设备上的MENU键,如果你有机器人:targetSdkVersion =11

If you overrode the MENU button to have other behavior, you will need to create some other trigger for that behavior for API Level 11 and higher. Overriding the MENU button was never a good idea to begin with, and as you can see, it is even less of a good idea now. I know of no way to get a MENU button on an Android 3.0 device if you have android:targetSdkVersion="11".

这篇关于安卓蜂巢菜单按钮目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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