Fragment standard transition not animating

I finally got this to work after much trial and error.

First and foremost, get the lastest ACL, it did fix custom animations, and while this was not my exact problem, once those worked I ended up using them instead of standard transitions.

Right now I am using:

ft.setCustomAnimations(android.R.anim.fade_in,android.R.anim.fade_out,android.R.anim.fade_in,android.R.anim.fade_out);

The key to making it work on both Android 2.1, 2.2 and 2.3, as well as Android 3.0+ was to do the following:

  • Make sure you are using ONLY API´s available to the lowest API LEVEL you wish to support (in my case 2.1).
  • Compile using Android 3.0.
  • In the manifest file, set android:hardwareAccelerated="true" inside your application tag.

Fragment animations now work on all devices. If you do not set the extra info in the application tag, the animation will occur, but in a very very choppy way, making it seem as though it did not happen at all.

Hope this helps someone in the future!

As a note, there are some API checking tools so you are sure you are not using any APIs that aren’t available to you. I prefer to work on 2.1 so the IDE doesn’t show anything I can’t use, once I have stable code I jump back to compiling on 3.0

Leave a Comment