I want to build in my application an ActionBar with a button that makes the role of the old hardware menu button. I'm working on 4.0.3 platform with min sdk=8. The problem is i don't have the menu button in ActionBar and always have to press on emulator menu button to show it. Don't know what to do, there is surely a trick.
Menu:
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_settings"
android:icon="@drawable/ic_action_settings"
android:showAsAction="always"
android:title="@string/menu_settings"/>
<item android:id="@+id/menu_help"
android:title="Help">
</item>
</menu>
And prepare the menu in Java code like always:
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return super.onCreateOptionsMenu(menu);
}
I want a button in Actionbar that shows that menu. Possible?