The native fragment API uses the new (since 3.0) animators. http://developer.android.com/guide/topics/graphics/prop-animation.html
You can see the difference in the source, too: https://android.googlesource.com/platform/frameworks/support/+/refs/heads/master/v4/java/android/support/v4/app/FragmentManager.java 1. Animation anim = AnimationUtils.*loadAnimation*(mActivity,fragment .mNextAnim); https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/app/FragmentManager.java 1. Animator anim = AnimatorInflater.*loadAnimator*(mActivity,fragment .mNextAnim); -- K On Monday, January 28, 2013 4:14:36 AM UTC+4, Doug Gordon wrote: > > The following code used to work fine in a previous iteration of my app > that was targeted to V11 but used the support library to support > fragments, etc., from the minimum V7 and up: > > Fragment frag = > ShowExhibit.ShowExhibitFrag.newInstance(args); > FragmentTransaction ft = > mFrag.getFragmentManager().beginTransaction(); > ft.setCustomAnimations(android.R.anim.fade_in, > android.R.anim.fade_out, > android.R.anim.fade_in, android.R.anim.fade_out); > ft.replace(mParentId, frag); > ft.addToBackStack(null); > ft.commit(); > > Now I'm creating a new version that targets V14 and also has a min of > V14, so no need to use the support library for fragments. Running this > on the emulator running Android 4.0 (V14), I get the following fatal > error on the transition: > > FATAL EXCEPTION: main > java.lang.RuntimeException: Unknown animator name: alpha > at > android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:129) > > > at > android.animation.AnimatorInflater.createAnimatorFromXml(AnimatorInflater.java:93) > > > > So what has changed? I can load my previous app version on this same > emulator and it runs just fine. None of the code related to this > operation has changed in any way. The emulator was created using the > standard "Galaxy Nexus" definition within ADT. > -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

