Reputation: 2362
My app provides a menu which can be reached by clicking the Android menu button. As Google removed the hardware menu button since 3.0 there is a software emuated button (typically 3 dots) on the screen to access the menu.
A lot of users with a Google Nexus phone complain now that since they updated to 4.1.2 that the menu button does not appear.
Here the code:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, 0, Menu.NONE, this.getString(R.string.setting));
menu.add(0, 1, Menu.NONE, this.getString(R.string.config));
return super.onCreateOptionsMenu(menu);
}
What do I have to change to bring the button back also on 4.1.2?
Upvotes: 2
Views: 8472
Reputation: 4389
The correct solution to this problem is to implement an ActionBar (ActionBarSherlock is a good option if you want to harmonise the look & feel of your app accross Android versions) :
Upvotes: 2
Reputation: 3136
I had the same problem on tablets and now it seems to be generalized to phones also. The only solution is either to add an ActionBar (you'll get then you menu entries in it automatically) or to make the android:targetSdkVersion below 11.
Upvotes: 8