15

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?

1

3 Answers 3

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

7
  • thanks ashton.Seems like I got what i wanted following your link.The compatability package would do the job it seems. android-developers.blogspot.com/2011/03/fragments-for-all.html
    – rogerstone
    Apr 7, 2011 at 15:27
  • 2
    Thanks 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 actionbarsherlock.com. The GitHub repo is still the same as well. Jun 16, 2011 at 12:11
  • i guess the question for now is what to use among those 3?
    – Mikey
    Dec 9, 2011 at 14:18
  • 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. Dec 9, 2011 at 16:26
  • 1
    I uses this github.com/johannilsson/android-actionbar and it is very easy, i like. Oct 4, 2012 at 21:42
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.

2

If you are looking for a simplistic Actionbar solution you might want to give a look to ActionBarCompat from the Google Official examples

4
  • 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, 2013 at 4:53
  • It should give you an actionbar but without an overflow. That's why is simplistic
    – Necronet
    Jan 30, 2013 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, 2013 at 4:05
  • 1
    Justa as a regular menu does onOptionsItemSelected if you are inside a fragment remeber to do setHasOptionsMenu(true)
    – Necronet
    Jan 31, 2013 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.