Chapter 4. Animation

Android apps have a number of distinctive animation characteristics that add context and meaning for the user. For example, pages slide left as users drill down through links, and slide right as they navigate back. In this chapter, you’ll learn how to add characteristic behaviors like sliding, page flip, and more to your web app. These changes will make your web app almost indistinguishable from a native application.

With a Little Help from Our Friend

I’ll be honest: making a web page animate like a typical native app is hard. Fortunately, an enterprising young lad named David Kaneda has created a JavaScript library called jQTouch that makes mobile web development a whole heckuva lot easier. jQTouch is an open source jQuery plug-in that handles virtually everything we learned in the previous chapter, as well as a boatload of much more complex stuff that would be truly painful to write from scratch.

Note

At the time of this writing, the stable release of jQTouch is v1.0b3.1, which you can download at https://github.com/senchalabs/jQTouch/zipball/b3.1. Some fairly significant changes are planned for the next release of jQTouch. If a newer version is available by the time you read this, you might want to stick with v1.0b3.1 while you go through the rest of the book, and upgrade to the latest version only after you are comfortable with the underlying concepts.

Get Building Android Apps with HTML, CSS, and JavaScript, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.