Action Bar on Android 2.x

The Action Bar in action

The Action Bar in action

One of the highly praised features of Android 3.0 was the inclusion of the Action Bar and Fragment system. The Action Bar being a replacement for the until then widely used menu button with features to make the creation of navigation, options and a good looking user interface a lot easier. All these new features came paired with one big issue: They weren’t supported on older Android versions. This required developer who wanted to use these new playthings to pick between two options: Target only 3.0 and onward and thereby missing out on a lot of potential customers or making seperate app layouts for the different Android versions.

Google solved this partially by releasing theĀ Android Compatiblity Pack, which, when implemented, allowed older Android versions to use the Fragment system. However, the Action Bar was still nowhere to be found on the older Android versions.

Luckily, a developer named Jake Wharton noticed this and started developing a solution: ActionBarSherlock. This extension to the Android Support Library will allow developers to use a single API to implement Action Bar support for all Android versions from 2.1 and up. When run on a Android 3.0 or up this library will call the native Action Bar API’s. When run on Android 2.x the library will create a custom implementation of the Action Bar, which contains nearly all functionality the native Action Bar has to offer.

Continue reading