I recently read about the action bar implementation in android in the dev site.But i found that it requires a minimum api level of 11.Can someone tell me whether it is possible to implement action bar in Api levels less than 11 such as 8 or 9.If yes how can i do this?
Asked
Active
Viewed 2.0k times
15
-
See this question: http://stackoverflow.com/questions/2900509/android-action-bar-like-twitter-sample – Olegas Mar 18 '11 at 08:18
3 Answers
17
ActionBarSherlock at http://actionbarsherlock.com is an Android library for implementing the action bar design pattern using the native ActionBar on 3.0+ and a third-party library on pre-3.0.
There is now also ActionBarCompat - part of the Android Support Library: http://android-developers.blogspot.co.uk/2013/08/actionbarcompat-and-io-2013-app-source.html

Intrications
- 16,782
- 9
- 50
- 50
-
thanks ashton.Seems like I got what i wanted following your link.The compatability package would do the job it seems. http://android-developers.blogspot.com/2011/03/fragments-for-all.html – rogerstone Apr 07 '11 at 15:27
-
2Thanks for the mention, @AshtonBRSC. @rogerstone The compat library does not include support for the action bar. The library of mine mentioned above has been recently updated to be based on the compatibility library and include an action bar implementation for API levels less than 11. You can check it out at http://actionbarsherlock.com. The GitHub repo is still the same as well. – Jake Wharton Jun 16 '11 at 12:11
-
-
As I hinted by the order I placed the links in, I recommend trying ActionBarSherlock. It's the most comprehensive and as close to native as it can be on all versions of Android. – Intrications Dec 09 '11 at 16:26
-
1I uses this https://github.com/johannilsson/android-actionbar and it is very easy, i like. – ademar111190 Oct 04 '12 at 21:42
-
Sorry but actionbarsherlock does not seem to work with API level 10. The requirements section says "Due to its use of the native action bar and its related classes on Ice Cream Sandwich, the library requires that both it and your project are compiled with Android 4.0 or newer"... Well, so any alternative for API level 10 ? – Christophe Fondacci Nov 11 '13 at 02:37
-
@ChristopheFondacci That just means it needs to be *compiled* with API version 14 or newer. It will still run on earlier versions. – Intrications Nov 11 '13 at 18:08
2
If you are looking for a simplistic Actionbar solution you might want to give a look to ActionBarCompat from the Google Official examples

Necronet
- 6,704
- 9
- 49
- 89
-
I tried this but the action bar is not displayed on the GB version. Doesn't that defeat the purpose of this package? – Namratha Jan 30 '13 at 04:53
-
It should give you an actionbar but without an overflow. That's why is simplistic – Necronet Jan 30 '13 at 11:24
-
I see. How do you get a handle on the action items though? I haven't found a way yet. – Namratha Jan 31 '13 at 04:05
-
1Justa as a regular menu does onOptionsItemSelected if you are inside a fragment remeber to do setHasOptionsMenu(true) – Necronet Jan 31 '13 at 10:48
2
There are third-party implementations of the action bar available. See this library project at github: android-actionbar. The manifest says the minimum API level is 3, target API is 8.

dfjacobs
- 1,055
- 11
- 17