Difference Between Actionbarsherlock and Actionbar Compatibility

Difference between ActionBarSherlock and ActionBar Compatibility

ActionBarSherlock gives your application an action bar regardless* of what version of the android API your app is being run on. Action Bar Compatibility gives you the action bar only if the device that you're running on is API level 3.0 or above.

*Note that if the device you're running on isn't 3.0 or above, ActionBarSherlock is going to use it's own custom implementation of the action bar, not a native one.

--EDIT--

It appears things have changed and there is actually no difference between ActionBarSherlock and the Action Bar Compatibility anymore. Please read the comments below for details.

--EDIT--

After having used both now, I can say that I actually prefer ActionBarSherlock to Action Bar Compatibility. ActionBarSherlock is really easy and nice to use.

--EDIT--
As LOG_TAG mentioned, there is now support for the action bar in the Android Support Library. I haven't had a chance to use it yet, but I would imagine that's the best one to use.

Recommendation between native ActionBar and ActionBarSherlock

If you're not supporting older devices, there's no reason to use a compatibility surrogate.

I'd go for the native library.
So, not to add extra weight to my app and take advantage of what I already have.

In the other hand, if and external library would offer so many extra features, I could consider it.

Better if it's open source, so that I can cut off all the features I'm not interested in.

Comparing The android action bar compat, pager and tabs sample to ActionBarSherlock

I've used ABS on several projects and it's a dream. It saves me an enormous amount of time, the apps look great, and the version compatibility is excellent.

Navigation Tabs are a Google recommended approach to primary navigation as part of the ActionBar, so I'd say use that (or ActionBar actions, or a drop-down spinner), unless you have a good reason not too. And as it's in ABS and works back to older versions, it's pretty easy to implement, so you can spend time on the actual app.

ABS does take a little effort to get the dependencies set up, but it's just a library project, it's not hard, and the little time needed is massively made up for by the benefits.

I think the main difference between the last two options is whether you want users to side-swipe between tabs, and that will depend on the app. If you want side-swiping, go with the pager, if not the ActionBar NavigationTabs will probably do the job.

Android compatibility contextual action bar

Setting up contextual actionbar is the same to setting up the 'regular' ActionBar items as far as the XML is concerned. This example in the developer's guide explains it all.

In order to use ActionBarSherlock, replace the default Android-callbacks to the ActionBarSherlock-edited callbacks (e.g. instead of Android.View.ActionMode, use com.actionbarsherlock.view.ActionMode).

Should I use SupportLibrary ActionBar, or alternative?

The original Support Library simply isn't that good for ActionBar usage, giving ActionBarSherlock a right to exist. Google will soon (Or is it here already?) come with a new version of this ActionBar support, as announced recently on the Google I/O 2013.

I think you're still looking at the original, not so good, library and thus you should use ActionBarSherlock.

Transferring your question to the near future, asking if you should use the new ActionBarCompat Library, or ActionBarSherlock: I would say It's more a matter of personal preference.

(Of course...) Google advises people to use this new library instead of ActionBarSherlock. However, they do bring this with the message that there is nothing wrong with ActionBarSherlock and that you shouldn't go through the trouble of replacing it in existing projects.

If you want to invest learning this new support library, it is the advised way to go. However, personally i think its a waste of time. Lots of people are already familiar with ActionBarSherlock, at lot of help, tutorials and questions about using it are on the internet to get you going and using the new lib. Probably won't even give you any real advantages.

Probably, by the time the new library is as easy to find help for, as ActionBarSherlock, people hardly need it anymore since more and more developers will drop supporting older versions that don't have an ActionBar by themselves.

Is actionbarsherlock needed anymore?

Refer This question to wheter you want to use actionsharlock or not:
Also it have a detail compare in screen between two:

Difference between ActionBarSherlock and ActionBar Compatibility
actionbarsherlock-and-actionbar-compatibility

Not supporting actionbar backward compatibility

Make following changes-

1. Import a actionbarsherlock library.

2. Add actionbarsherlock-i18n to project libraries.

3. Make theme as Theme.sharelock in Manifest file.

4. And do some Syntacticla changes as per requirement.

Is using ActionBarSherlock still necessary?

This system looks like it provides a fully functioning actionbar system on preHoneycomb devices.

ActionBarCompat is not "fully functioning", as compared to the native action bar or ActionBarSherlock.

Has anyone managed to use this actionbarhelper class with actionbartabs?

It does not support tabs.

I'm having a heck of a time trying to import my android project to work with ABS, whether it was getting my R file to link, bringing the manifest into the folder, getting the correct package names so my activities would launch, and beyond all that, the highly cluttered src folder.

Step #1: Download the ABS ZIP file.

Step #2: Import the project (in library/) into Eclipse, marking it to compile with Android 4.0 or higher.

Step #3: Add it as a library project to your existing project.

Step #4: Inherit from SherlockActivity or related classes (e.g., SherlockListActivity), and update other references (e.g., MenuInflater) to Sherlock equivalents as needed.

Step #5: Add Theme.Sherlock to your <application> or <activity> elements.

And that's pretty much it, beyond what you would ordinarily do to use the native action bar.

So if it's possible to use this Google-provided code instead, I think it might be desirable

Code in the "samples" area of the Android Developers site is just that: sample code. The code is unsupported, un-maintained (some don't even work anymore), etc. If you would prefer to use such code over a component that has many more engineers using it, has its own support group, etc., you are welcome to do so.

This is my first application on Android and it's been a beast just getting to the point where I can say I have a fully functioning ViewPager, TabAdapter, system of fragment tabs, and some basic login/register features from an SQL server.

Then perhaps you should start with a simpler app. What you are describing is not what I would recommend somebody start with, unless they are getting specific guidance (e.g., a set of tutorials).



Related Topics



Leave a reply



Submit