标签:
*Property Animation
ObjectAnimator anim=ObjectAnimator.ofFloat((textView, "asdfasdf", 0F, 1F);
anim.setDuration(2000);
anim.addUpdateListener(new AnimatorUpdateListener() {
//当ObjectAnimator需要更新TextView的属性时
public void onAnimationUpdate(ValueAnimator animation) {
Float value=(Float)animation.getAnimatedValue();
textView.setAlpha(value);
textView.setScaleX(value);
textView.setScaleY(value);
}
});
anim.start();
*Frame Animation 帧动画
1>构建AnimationDrawable对象。
anim=new AnimationDrawable();
2>向AnimationDrawable对象中添加帧
anim.addFrame()
3>调用view.setBackground(anim)
4>anim.start()
thinking for android's animation
标签:
原文地址:http://www.cnblogs.com/gentspy/p/5249133.html