Google Tells Android Developers to Stop Using the Menu Button | eWeek

Google Tells Android Developers to Stop Using the Menu Button

Écrit par
Darryl K. Taft
Darryl K. Taft
Jan 27, 2012
2 minute read
eWeek Le contenu et les recommandations de produits sont indépendants de la rédaction. Nous pouvons gagner de l'argent lorsque vous cliquez sur des liens vers nos partenaires. En savoir plus

Google is telling Android developers to stop using its Menu button and begin using the Action Bar that was introduced with the Android 3.0 Honeycomb release.

Scott Main, lead tech writer for developer.android.com, penned a Jan. 26 blog post titled “Say Goodbye to the menu Button” to help wean developers off the Menu button. Cutting right to the point, Main said, “Not only should your apps stop relying on the hardware Menu button, but you should stop thinking about your activities using a ‘menu button’ at all.”

Main said before Honeycomb, all Android-powered devices included a dedicated Menu button. “As a developer, you could use the Menu button to display whatever options were relevant to the user, often using the activity’s built-in options menu,” he said.

However, “Honeycomb removed the reliance on physical buttons, and introduced the Action Bar class as the standard solution to make actions from the user options immediately visible and quick to invoke,” Main said. “In order to provide the most intuitive and consistent user experience in your apps, you should migrate your designs away from using the Menu button and toward using the action bar. This isn’t a new concept-the action bar pattern has been around on Android even before Honeycomb-but as Ice Cream Sandwich rolls out to more devices, it’s important that you begin to migrate your designs to the action bar in order to promote a consistent Android user experience.”

Main said developers needn’t be concerned that it will take a lot of work to begin using the Action Bar because of the need to support versions of Android older than Honeycomb. “It’s quite simple for most apps because you can continue to support the Menu button on pre-Honeycomb devices, but also provide the action bar on newer devices with only a few lines of code changes,” he said.

Summarizing his post, Main added:

“If I had to put this whole post into one sentence, it’d be: Set targetSdkVersion to 14 and, if you use the options menu, surface a few actions in the action bar with showAsAction=”ifRoom”.“

eWeek Logo

eWeek has the latest technology news and analysis, buying guides, and product reviews for IT professionals and technology buyers. The site's focus is on innovative solutions and covering in-depth technical content. eWeek stays on the cutting edge of technology news and IT trends through interviews and expert analysis. Gain insight from top innovators and thought leaders in the fields of IT, business, enterprise software, startups, and more.

Propriété de TechnologyAdvice. © 2026 TechnologyAdvice. Tous droits réservés

Divulgation publicitaire : Certains des produits qui apparaissent sur ce site proviennent d'entreprises dont TechnologyAdvice reçoit une compensation. Cette compensation peut influencer la façon dont les produits apparaissent sur ce site, notamment l'ordre dans lequel ils apparaissent. TechnologyAdvice n'inclut pas toutes les entreprises ou tous les types de produits disponibles sur le marché.