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
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.