如何使用“ android.animation”包为平板电脑创建基本的图像动画

|| 我使用
android.view
包创建了一些图像和电影应用程序。现在,我想为Android平板电脑创建相同的内容。 我看到可以将
android.animation
包用于Android 3.0,但是找不到使用此包来应用淡化,缩放效果的文档。我正在尝试转换此包中的所有源代码。 如何使用
ValueAnimator
ObjectAnimator
?在Api演示中,我找到了此代码以进行衰落。但是,如何分配Alpha值?在
view.animation
中,我有
fromAlpha, toAlpha...
ValueAnimator fadeAnim = ObjectAnimator.ofFloat(newBall, \"alpha\", 1f, 0f);
        fadeAnim.setDuration(250);
        fadeAnim.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                balls.remove(((ObjectAnimator)animation).getTarget());

            }
        });
同样,我有这段代码:
ValueAnimator anim = ValueAnimator.ofFloat(0f, 1f);
anim.setDuration(500);
anim.start();
什么时候使用
ValuAnimator
,什么时候使用
ObjectAnimator
?     
已邀请:
        android开发者博客上有两个关于此主题的博文,分别为http://android-developers.blogspot.com/2011/02/animation-in-honeycomb.html和http://android-developers.blogspot.com/2011 /05/introducing-viewpropertyanimator.html 我强烈推荐这两篇文章,因为在阅读它们之后我对新的动画API有了很好的理解。     

要回复问题请先登录注册