Question

I have a problem where there is an icon that shows the options menu on my actionbar and another in the navigation bar. Both works and calls the menu but i want to show only one. What to do? Thanks in advance.

Was it helpful?

Solution

As per the Say Goodbye to the Menu Button blog post, the action overflow button for legacy apps appears if you are not targeting a newer version of Android:

  • If you set either minSdkVersion or targetSdkVersion to 11 or higher, the system will not add the legacy overflow button.

  • Otherwise, the system will add the legacy overflow button when running on Android 3.0 or higher.

  • The only exception is that if you set minSdkVersion to 10 or lower, set targetSdkVersion to 11, 12, or 13, and you do not use ActionBar, the system will add the legacy overflow button when running your app on a handset with Android 4.0 or higher.

You should always target the latest SDK version that you have tested your app on (which preferably is the newest released version) - setting your targetSdkVersion to greater than 13 is the easiest way to remove the legacy action overflow button.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top