如何在较旧的Android版本中使用Fragments和objectAnimator?

unc*_*Lem 5 android android-fragments objectanimator

我尝试使用片段和objectAnimator来制作这里的翻转动画,并且在Android 4.1上一切正常,但是当我尝试添加时android-support-v13. jar,使用FragmentActivity并在旧版本上启动它,片段之间的动画会使应用程序崩溃并出现此错误:

java.lang.RuntimeException: Unknown animation name: objectAnimator
Run Code Online (Sandbox Code Playgroud)

请问,您能说我如何使用objectAnimator或如何使用常见的Android动画创建翻转动画?

UPD:我也尝试过使用http://nineoldandroids.com/,但我无法理解它如何用于活动过渡动画.

Gin*_*ama 0

https://developer.android.com/guide/topics/graphics/prop-animation.html#declaring-xml

从 Android 3.1 开始,您应该将属性动画的 XML 文件保存在 res/animator/ 目录(而不是 res/anim/)中。