Search code examples
androidactionbarsherlockandroid-actionbarandroid-actionbar-compat

Implementing an Action Bar: ABSherlock or ABCompat?


The application currently has tabulations and bar custom made (by previous guy) from fragments to copy cat Apple design.

I want to move toward Android action bar to provide Android experience and usual behavior.

Should I implement Action Bar Sherlock or Action Bar Compat?

Pro ABS:

  • Lots of documentation
  • Action bar Tabs is well known (that's what I need to do)
  • About Holo theme? ABS is great to support it, how perform ABCompat?

Pro ABCompat:

  • Supported by Google (better in the long run?)
  • Better connection with navigation drawer (but I will not use one)
  • No external dependencies in Java Build path

What others arguments help decide? Which one should I pick ?

From my point of view, provided I succeed to do a action bar with fixed tabs, the Action Bar compatibility is the best choice (but not by much).

Thank you for helping me! (even providing arguments I missed)


Solution

  • The main reason that made me switch to ActionBarCompat is the Menu appearence in devices with android <= 2.3. With ActionBarSherlock, the menu appears very ugly, with the default menu of the device. With the ActionBarCompat, the menu appears the same way it appears when you open it in devices with Android >= 4.0 and hardware menu key.

    But, be aware that the ActionBarCompat has some bugs to be resolved yet. I'm dealing with this bug:

    SearchView taking all the space in the new ActionBarCompat

    UPDATE:

    Another bug:

    https://code.google.com/p/android/issues/detail?id=58321&thanks=58321&ts=1375277660

    UPDATE:

    I've created a patched version of the ActionBarCompat to solve the issue with the ActionMode. See here:

    The ActionMode is being created twice with the ActionBarCompat r18