HTML5 Zone is brought to you in partnership with:

Isaac Taylor is an aspiring mobile developer and a technology geek. He spends most of his development time finding kinks in developing apps and mobile web sites for Android, iOS and Windows Phone 7, and he posts the solutions so you don't have to. When not developing software himself, he's likely reading about how to write better code. Isaac is a DZone MVB and is not an employee of DZone and has posted 11 posts at DZone. You can read more from them at their website. View Full User Profile

Android WebView CSS Support

08.13.2012
| 6065 views |
  • submit to reddit
Creating HTML applications can be a great way to cut down development time between two platforms. The trend today is to develop a web app for iOS (with a varying amount of native code) and simply use the HTML, CSS, and Javascript on other platforms like Android.

The process can work well, and it can save you considerable time while still having a nice, polished app on multiple platforms. The approach has a few pitfalls, though. One of the main troubles is developing for iOS first.

You see, iOS has a great in-app browser. It has support for all of the latest HTML5 components, it fully supports CSS3, and it has great Javascript performance. The problem is that no other platform is near this level yet. This can create some issues when you are porting your HTML, CSS, and Javascript to other platforms such as the Android.

When following the pattern above, you should really develop for the lower platform first and then port to iOS. This way, you will have less development time lost to solving compabability issues. Some of these issues could be: Javascript DOM differences, CSS3 syntactical differences, and Javascript performance differences. Also, keep in mind that the usage of third-party libraries may work great on iOS but may not work on other platforms. It may not even have an equivalent version available.

One more thing to watch out for is:

-webkit-linear-gradient... versus  -webkit-gradient...

I'm sure that there are several other major differences between what is supported between Android and iOS. Once I find more, I'll let you know.
Published at DZone with permission of Isaac Taylor, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)