这个google API教程展示了如何动画视图。然而,它使用了API级别11中可用的方法,例如View.setAlpha
现在,使用android 2.1 (API 7)的手机,我可以发现许多应用程序使用相同的动画(卡片翻转动画非常流行)
是否有任何谷歌库来做本教程中显示的动画,将与任何API在11之前工作?如果没有,还有其他选择吗?
p。S:我知道这个问题,但显然这是专门针对objectanimator的,并且得到了一个无用的答案
nineoldandroid将能够为您提供您在11+中看到的动画api。例如…
ViewHelper.setAlpha(view, 0);
简单的动画,如变换,旋转,移动(这似乎是你想要的)可以用这样的类:
http://developer.android.com/reference/android/view/animation/AnimationUtils.html http://developer.android.com/reference/android/animation/AnimatorSet.html http://developer.android.com/reference/android/view/animation/Animation.html简而言之,你将创建动画资源(或类)并在视图上运行它。在动画结束后,你可能需要通过visibility方法隐藏这个视图。
查看详细信息- http://jmsliu.com/779/android-view-animation-example.html.