среда, 1. фебруар 2012.

Android Menu button to be phased out, and replaced by Action Bar

Related Stories: Android 4.0 ICS gets a style guide,... Lenovo to update ThinkPad Tablet with... Google opens Samsung Galaxy Nexus registration... Google is now recommending that Android app developers stop using the Menu button for their apps, instead, start using the Action Bar introduced in Honeycomb, and incorporated in Ice Cream Sandwich. A new section of the Android Design style guide has also been made, with recommendations on how developers should design their Action Bars.

The move is another step away from hardware buttons, a trend seen in Honeycomb tablets, and Ice Cream Sandwich devices, which like the Galaxy Nexus, only feature Back, Home, and Recent Apps buttons – doing away with Menu, and Search buttons.

The change in design philosophy was announced on the developer.android.com blog, with Scott Main, Lead Tech Writer, explaining that developers should move away from using to the menu button, toward the more intuitive and consistent 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.”

If as a developer, you felt this meant you would have to program to different versions, one for pre-Honeycomb devices with a hardware menu button, and another for Honeycomb and higher versions, you can be reassured that this is not the case – “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.”

Emphasizing the ease of the migration, Scott Main summarized – “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

View the Original article

Нема коментара:

Постави коментар