Is there an alternative for ActionBar in 2.2?

Since ActionBar is only available in Android 3.0 and later, what is a good way to implement a widget like ActionBar in earlier versions of sdk? I want to do this programmatically without using main.xml if that helps.

+8
android android-actionbar android-widget android-2.2-froyo
source share
3 answers

As @Tony says, you can take a look at ActionBarSherlock, a library that provides all the ActionBar functionality and additional features (like new animations and PagerIndicator) back in Android 2.x.

It basically has an ActionBar implementation that will be used if you use your application on a device with Android 2.x. In case your application is running on a device with Android 3.0 or later, it will use the default Android ActionBar implementation.

Last week, I posted a post on how to use ActionBarSerlock in your application. If you want, you can take a look at it: Using an ActionBar in an Android app using ActionBarSherlock

+7
source share

You can use ActionBarSherlock ( http://actionbarsherlock.com ). This will allow you to have an action bar in earlier versions of Android.

+3
source share

See the sample application in the sample folder. There is one called actionbarcompat with the actionbarcombatability panel.

+2
source share

All Articles