Android Developers Urged To Halt Menu Button Use

Google is instructing Android developers to kill of the use of its Menu button in their Android apps, and rather 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 26 January blog post titled “Say Goodbye to the menu Button” to help wean developers off the Menu button.

No More Menu?

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.”

Android Compatibility

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.

Summarising 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”.

Darryl K. Taft

Darryl K. Taft covers IBM, big data and a number of other topics for TechWeekEurope and eWeek

Recent Posts

Meta To Spend $10 Billion On Largest Data Centre To Date

Facebook parent confirms its 23rd data centre in the US will be located in Louisiana,…

13 hours ago

Musk’s Neuralink Animal Lab Cited For ‘Objectionable Conditions’

Federal regulator reportedly cites animal lab at Elon Musk's Neuralink for “objectionable conditions or practices”

15 hours ago

Trump Nominates Cryptocurrency Advocate Paul Atkins As SEC Chair

President-elect Donald Trump nominates a new chairman to head the SEC, who is a noted…

17 hours ago

CMA Clears Vodafone, Three Merger After Price Promise

UK regulator approves Vodafone, Three merger, after receiving commitments over price, network, and virtual mobile…

18 hours ago

Amazon Sued For Halting Deliveries To Two Black Neighbourhoods

District of Columbia sues Amazon, alleging it secretly stopped fastest delivery service to two predominantly…

20 hours ago

Bitcoin Surges Past $100,000 For First Time, Amid Trump Optimism

Crypto optimism under Trump's presidency, pushes the price of Bitcoin past $100,000 for the first…

22 hours ago