Android 动画

android中提供了4中动画:
AlphaAnimation 透明度动画效果
ScaleAnimation 缩放动画效果
TranslateAnimation 位移动画效果
RotateAnimation 旋转动画效果 

public AnimationSet ZxqAnimation() {
    Log.d("ZXQ", "charZxqAnimation");
    Animation translateAnimation = null;
    int ANIMATION_TIME = 600;

    translateAnimation = new TranslateAnimation(0.0f, 0.0f, 0.0f, 500.0f);
    translateAnimation.setDuration(ANIMATION_TIME);
    translateAnimation.setInterpolator(new AnticipateInterpolator());
    AlphaAnimation alphaAnimation = new AlphaAnimation(1, 0.8f); 
    alphaAnimation.setDuration(ANIMATION_TIME);
    ScaleAnimation scaleAnimation =new ScaleAnimation(1.2f, 0.3f, 1.2f, 0.3f); 
    scaleAnimation.setDuration(ANIMATION_TIME);

    AnimationSet animationSet = new AnimationSet(false);
    animationSet.addAnimation(alphaAnimation);
    animationSet.addAnimation(scaleAnimation);
    animationSet.addAnimation(translateAnimation);

    return animationSet;
}

 

 

http://www.jb51.net/article/32340.htm

http://www.jb51.net/article/32337.htm

http://www.jb51.net/article/32340.htm

http://www.jb51.net/article/32337.htm

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。