How do I control the soft menu button in Honeycomb?

心不动则不痛 提交于 2019-12-10 22:35:32

问题


I have an app in which I want to turn the menu button off (I'm picking up someone else's project and am not sure what is provoking the menu button to appear)... it doesn't *do anything. Is there a way to turn off that icon manually? Or do I have to hunt down the reason for its being displayed in the first place? (please no flak for looking for a workaround, obviously in an ideal world I'd be familiar enough with the code to know why the menu button is being generated, but time is of the essence and since it's a non functional button, I see no harm in just forcing it to go away).

TIA


回答1:


Based on a suggestion here:

http://groups.google.com/group/android-developers/browse_thread/thread/c4b1b835060bd93f/4ed12919b4147008

I managed to get rid of the menu button on Honeycomb by setting my targetSdkVersion to 11 in my manifest:

android:targetSdkVersion="11"

If you do end up implementing some menu options, I believe they will end up being put into the little widget at the top right (don't know what it's called).




回答2:


Is there a way to turn off that icon manually?

Don't have an options menu -- IOW, don't implement onCreateOptionsMenu() or onPrepareOptionsMenu(). Having an options menu is the only thing that causes the options menu button to appear on Honeycomb, AFAIK.



来源:https://stackoverflow.com/questions/5679876/how-do-i-control-the-soft-menu-button-in-honeycomb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!