In the article titled “Adding Action items and Overflow menu items to Action Bar in Android“, we have seen how to add action items and overflow menu items to action bar in Android. Since action bar is introduced in Android 3.0 ( API Level 11 ) , we can not run that application in Android versions prior to Honeycomb. In order to overcome this limitation, we can make use Action bar Sherlock library which facilitates to create action bar in pre Honeycomb versions ( 2.x versions ) .

By default, ADT plugin adds a support library ( lib/android-support-v4.jar ) to the project. This is not needed for our application since this is being added by Sherlock library. So in order to avoid the conflict, delete the default support library via Eclipse’s project explorer.

7. Add Sherlock library to this project

Open the properties window of this project ( by right clicking the application at project explorer ) , and select Android tab to add the Sherlock library to this project.

Figure 5 : Add Sherlock actionbar library

8. Add menu icons to this project

From the given below links, download the files drawable-mdpi.zip, drawable-hdpi.zip and drawable-xhdpi.zip and extract to the folders drawable-mdpi, drawable-hdpi and drawable-xhdpi respectively

but if i replace android:theme=”@style/Theme.Sherlock.ForceOverflow” line by android:theme=”@style/Theme.Sherlock”, how would i get the output in “Action items and Overflow menu items” (Fig 6) screen?? plz help