ActionBarSherlock is an opensourcel ibrary to provide support for ActionBar from API4.

The library is a recompilation of the original support-v4 of google, that means that you only need the sherlock library even if you need other support stuff.

How to use SherlockActionBar:

  1. Download the ActionBarSherlock from
  2. Import the library folder as a project inside the eclipse workspace
  3. Check the AndroidManifest if you have the correct android version (now you must compile with the API 15)
  4. Change the compiler java compilance to 1.6: project -> Preference -> Java compiler
  5. On you project use the project as a Android library : project -> Prefence -> android -> add library

Okay, now you have the sherlockActionBar library to use on your project

First thing, you must change your Activities base classes to SherlockActivity(SherlockListActivity etc...)

Once, you can use the normal actionBar api of google but instead of using the getActionBar method of activity to get the object to configure, you must use the getSupportActionBar()

a simple example here:

package net.coscolla.examples.template_sherloc;

import com.actionbarsherlock.view.MenuInflater;

import android.os.Bundle;  
import android.view.Menu;

public class MainActivity extends SherlockActivity {

    public void onCreate(Bundle savedInstanceState) {



    public boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {
        MenuInflater inflater = this.getSupportMenuInflater();
        inflater.inflate(, menu);
        return true;