How to use honeycomb animation APIs for compat fragment

Tutorials with advanced 'difficulty' and more Lines of Code.

How to use honeycomb animation APIs for compat fragment

Postby voidmain » Fri Aug 23, 2013 2:17 am

As we all know, since Google released Honeycomb (API level 11), a new set of APIs are introduced, like Fragment, ActionBar and Property Animation. In order for older devices to use these APIs, google also released a support library that provides some compatibility version of a subset of the new APIs, including compat fragment.

I've been using the compat version of fragment for a while, and found out that it is kind of tough to use the new animation APIs for compat fragment. The blame is on compatibility. Even though the support library do have a method named
Code: Select all
, but this method only takes the old animation XML resource id as parameters. If you try to set some xml with
Code: Select all
stuff in it, the app will simply crash.

I WILL NOT give up take full advantage of the new APIs, so after reading through the API samples, as well as googling around, I finally work it out. And here's a blog on how did I make it work:, also, I've open sourced the sample project on github:

Note that, the sample project is not quite robust. It is a quick sample anyway, so, don't ask for too much. :D

Hope this is useful for someone.

Have a nice day!
Once Poster
Once Poster
Posts: 1
Joined: Fri Aug 23, 2013 2:04 am


Return to Advanced Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest