James Oravec
James Oravec

Reputation: 20391

Android Menu Button Goes Away When Upgrading from API 10 to API 16

When using the same emulator (Galaxy Android 4.2.2 API Level 17), I change my manifest's minSdkVersion from API 10 (Android OS 2.3) to API 16 (Android OS 4.1,4.1.1). When I do so, my menu at the bottom right is not longer visible.

Since its the same emulator, and its the minimum version that changes I don't see why the menu button should go away.

From reading: http://developer.android.com/guide/topics/ui/menus.html

They state:

Beginning with Android 3.0 (API level 11), Android-powered devices are no longer required to provide a dedicated Menu button. With this change, Android apps should migrate away from a dependence on the traditional 6-item menu panel and instead provide an action bar to present common user actions.

I'm okay with migrating to an action bar, however I'm curious if there is an easy way to migrate my menu to the action bar.

EDT/Note:

I accepted Tanis.7x 's answer, because it got me going down the correct path. I found that I was able to get the action buttons working easily in a clean/new project, however my older project still had issues. I found that I made some modifications to the theme and manifest file. Referencing the new project that was working allowed me to get the old project working properly.

Upvotes: 1

Views: 1024

Answers (2)

Bryan Herbst
Bryan Herbst

Reputation: 67189

Migrating your menu is pretty straightforward. The process is outlined in Say Goodbye to the Menu Button on the Android Developer's blog.

As long as you haven't set your Application to remove the ActionBar, your items should already show up in the action overflow menu on the ActionBar.

You may want to promote certain common actions by adding an icon and/or setting the items to show as "action items" by setting showAsAction="ifRoom" in your menu XML. Action items show to the left of the action overflow menu.

Upvotes: 3

Lebedevsd
Lebedevsd

Reputation: 950

i had same problem, this button appeared only in capability mode, you should use android target version <14 in manifest.

Upvotes: -2

Related Questions