I'm a fan of the menu button as used in Android <3.0, as it was very useful for my game apps - it allowed me to take important but gameplay irrelevant functionality (saving game, reference info links) and place it somewhere where it did not clutter up the main game interface, but was still easily accessible (the options menu).
This use of keys became a problem with 3.0, because it removed the MENU button and substituted it with the Action Bar. The Action bar is really not suitable for a game which likes to run full-screen, so that was a real pain. No action bar - no access to the options menu. However, I could sort of ignore it for a while, since I didn't have that many users on tablets and lacked the time to test this.
However, ICS makes this a serious issue, since the MENU button is obviously not coming back. Now I don't only have to deal with this problems on tablets, but on phones as well.
My initial solution to this problem has been to simply place a soft button in my GUI to replace the hard MENU button
this.openOptionsMenu();
And everything is back to working perfectly in ICS.
However, this does not work on Honeycomb. Calling openOptionsMenu does absolutely nothing if you do not have the ActionBar visible.
Any thoughts on how to deal with this?
I suppose I could always go back to using TargetSDK < 11 (thereby forcing the ActionBar to appear on tablets), but as far as I can see this is merely pushing the problem into the future, which I would prefer not to do.
Drop the Options Menu entirely, and go over to only using Context Menus?
[Clarification: By this I mean that instead of opening an options menu - I only use context menus since - at least for now - these work on all devices].
Interested in hearing what others who have had similar issues with the whole Options Menu/ActionBar mess decided to do.
question from:
https://stackoverflow.com/questions/8774317/handling-the-missing-menu-button-in-new-versions-of-android-3-x-and-up 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…