Frequently Asked Questions

Have a question that is not listed on this page? See the "Direct Contact" section of the support page.

Is there a video that will help me get started?

Yes there is! Graham Smith was kind enough to make this:

Note: The library/ folder is now actionbarsherlock/.

What action bar library is used on pre-4.0 devices? The widget is a custom implementation that was purpose-built to mimic the API, functionality, and look of the native action bar on 4.0+ devices. It is primarily comprised of the sources from the Android Open Source Project with heavy modifications to ensure that it works on the earlier API levels.
Why isn't the native action bar used on Android 3.x? The action bar on Android 3.x (also known as Honeycomb) does not implement all of the features of the one in Android 4.x (Ice Cream Sandwich). In order to provide a full action bar API on all platforms as well as unify the styling across all versions of Android the custom implementation is used.

What API level should I compile with if I want to use the library? Use of this library requires that both it and your project are compiled with Android 4.0 (API 14) or newer.
What API level should I target in my manifest when using the library? Targetting API level 11 or newer is required as it will cause Android to automatically add the native action bar when run on newer devices. Since you will be compiling against new APIs but your app will likely be run on devices with older versions of Android extra care must be taken to either avoid using or properly check and call any methods that were introduced after your minimum SDK version.
Can you add functionality *X* to the action bar? As a general rule, no. If the native action bar on Android 3.0+ does not support it then it will not be supported by this library.
Why is ActionBarSherlock a library project whereas the original compatibility library is only a .jar? The custom action bar implementation within ActionBarSherlock relies on styles, themes, layouts, and drawables in order to display properly. Due to the limitations of Android and .jar files, this currently can not be accomplished any other way.
I found a bug, what should I do? See the support page and create an issue on GitHub, post to the Google Group, or contact me directly. Or do all three! The worst thing you can do is to not report it. Please try to include as much information as possible in your report.
Do I need to include the .jar file for the Android compatibility library when using ActionBarSherlock? Yes. ActionBarSherlock is built as an extension of the Android compatibility library and requires that it be included.
I get the following exception when using fragments: "Cannot interact with object designed for temporary instance passing." In order to provide the full ICS menu API the library provides its own fragment base classes. Like the activities, they are prefixed with 'Sherlock' and are provided for each of the fragment classes from the support library (e.g., SherlockFragment, SherlockDialogFragment).
I use Proguard. Are there any lines I should include to ensure functionality of the library?

Add the following lines:

-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }

-keepattributes *Annotation*