Welcome to the first of the Land of Droid developer articles, where we are going to show you some of the great libraries in the Android world which can help improve your application dramatically! First up we have a library called ActionBarSherlock. It sounds really odd, but in fact it’s used in many situations involving the Action Bar design Google are wanting us to include in our apps.
Simply it’s an extension to the Android Compatibility library which enables you access to some form of ActionBar right down to Android 2.x, and there is no difference between if it uses ICS’s ActionBar or the one it builds for you. If you want to have a play before using the library, get the demo app from Google Play:
To get started you’ll need to download and set-up the project with the latest version.
Before you do anything more, you will need to set the
<application>'s theme to one of the
Theme.Sherlock.Light themes, or extend them and build your own. There’s also a few more which are described on the website.
Then in your Activity classes you’ll need to make them extend from either
SherlockFragmentActivity so ActionBarSherlock can do it’s job.
Finally, the end is here. Just follow the official API for ActionBars just changing
getSupportActionBar() the same way you do with the Compatibility library.
Who uses it?
Loads of people already use this to provide backwards-compatible apps such as these
Easy to use and very stable producing really good results. You really should be using this library.