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 (sav
I added a special logic for 3.x releases. Only for these releases I use the action bar.
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.HONEYCOMB
|| Build.VERSION.SDK_INT == Build.VERSION_CODES.HONEYCOMB_MR1
|| Build.VERSION.SDK_INT == Build.VERSION_CODES.HONEYCOMB_MR2) {
requestWindowFeature(Window.FEATURE_ACTION_BAR);
}
else{
// hide the status bar, do not use action bar
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
For all other releases I display my own menu button and run my game in fullscreen mode. When pressing my menu button, I use the following code line, where "act" is the current activity.
act.openOptionsMenu();
As part of your menu xml, make sure to have a line like this to set "showAsAction"
showAsAction="ifRoom"