My experience with HoloEverywhere

I have been using HoloEverywhere for a while on my application “Next bus Barcelona“, and I thought it would be nice to share my experience with this library.

HoloEverywhere, in case you don’t know it already, is a library which attempts to make it easy for you to have the same look & feel across all Android versions starting from 2.1 to the most current one. It does this by recreating the Holo theme from Android 4.x. I must say that, of course, it isn’t easy to develop such a library. Some things can’t be solved by simply theming the old widgets, and have to be implemented from scratch, or by subclassing some Android classes. This is what HoloEverywhere does. Oh, and by the way, you must take into account that it has to carry many of the Holo resources, so this library will add about 3,3 MB to your existing application.

Hoping that it would make it easier to get an uniform Holo style across all platforms, I decided to implement it on my apps. I decided to try it with “Next bus Barcelona”, and the result seemed nice. Changing your app to use HoloEverywhere is simple but tedious, as you have to replace all references to Android widgets with their HoloEverywhere equivalents. It can take a large time if your app has a large codebase.

1st problem: The first problem was with some of the equivalent classes. I had some references in my app to the BaseAdapter class, obtained from ListView.getAdapter(). That gave me a ClassCastException, because the class returned by HoloEverywhere does not subclass BaseAdapter, and you have to change your BaseAdapter to ListAdapterWrapper.

2nd problem: The second problem was with a Spinner which kept the view from refreshing. It turned out to be a bug in HoloEverywhere, and I found a workaround on StackOverflow.

3rd problem: The third problem was that I had an Activity which was using a dialog theme, and it crashed on Android versions lower than 4.0. I rewrote it by using a DialogFragment, and everything went fine…

4th problem: Until I realized that the dialog wasn’t showing a title on Android versions lower than 4.0. I checked the HoloEverywhere code and managed to implement a workaround.

At this moment, and having solved all these  bugs, everything was working correctly, and I decided to publish the new version of my app, using HoloEverywhere 1.5.0. The app had no problems, until I released a new version with HoloEverywhere 1.5.1 instead of 1.5.0. So…

5th problem: I started getting reports from users which had some Sony Xperia phones (Sony Xperia U with Android 2.3.7, for example), telling me that the lists in the application disappeared.

I re-released it quickly by downgrading to 1.5.0, and everything went nice again…

6th problem: Until some other users, with many different phone models, started reporting that the app randomly hangs with a white screen. I don’t see any other reason to be a cause for this other than HoloEverywhere, so I decided to update to the latest stable version, 1.6.8, and ask one of the users to test it. Although she couldn’t reproduce the white screen problem, the ListViews which had scroll all disappeared, just like it happened with 1.5.1.

Finally: After all these problems, I have removed HoloEverywhere from my project. Yes, my app buttons and texts don’t look the same on every Android version out there, but I have got rid of many annoying bugs, and even better… my app is now 3,3 MB tinier!

In conclusion, we all know that every library has some bugs, it’s normal, there is no developer which makes no mistake. But when you have to use a library for a project (which isn’t anything outside of the normal project in Android), and you stomp on a pair of known bugs, and have to report four bugs yourself, some of them for common functionality like dialogs or context menus, I wouldn’t recommend it for production use.

Maybe someday HoloEverywhere will be less buggy and easier to integrate. I hope so, because it could make it easier for many developers to design their apps. But right now, I can’t quite recommend you to use it.

Tagged with: , , ,
3 comments on “My experience with HoloEverywhere
  1. Nammari says:

    I am using HoloEveryWhere in my next up coming project. one thing i have notice beside these bugs you mentioned . Its slow
    I have a ListFragment with a MergeAdapter [ ] that contains 4 different adapters
    when i scroll the list it lags a lot thought i am using the ViewHolder pattern in all of the 4 adapters and the hardware acceleration is on. when i removed it from my project . the list scroll fast .seems that the inflation time took some time .

    • Eduard Ereza says:

      Well, I can’t speak for your specific case, but I would recommend you to avoid HoloEverywhere if possible, and use a custom theme instead (unless you need a specific functionality that the new UI widgets offer).
      By the way, I must say that some of the bugs commented on this post have already been fixed nowadays, but who knows if there are any new ones…
      Anyway, good luck on your project!

  2. I am so glad I found this post. I was looking at the library with the intention of stealing some resources and was wondering whether to use it or not (despite it no longer being maintained). Now I know I am not.


Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.