此google API tutorial显示了如何为视图设置动画。但是,它使用API级别11提供的方法,例如View.setAlpha
现在,使用带有Android 2.1(API 7)的手机我可以找到许多使用相同类型动画的应用程序(卡片翻转动画很受欢迎)
是否有任何Google库可以执行本教程中显示的动画,这些动画适用于11之前的任何API? 如果没有,还有其他选择吗?
P.S我知道this question但是看起来很明显是关于objectanimator并且接受了无用的anser
答案 0 :(得分:1)
NineOldAndroids将能够为您提供11+以上的动画API。例如......
ViewHelper.setAlpha(view, 0);
答案 1 :(得分: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
简而言之,您将创建动画资源(或类)并在视图上运行它。在结束动画之后,您可能会通过可见性方法隐藏此视图。
查看详情 - http://jmsliu.com/779/android-view-animation-example.html。