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

posted @ 2015-05-25 17:12  carlo-z  阅读(129)  评论(0编辑  收藏  举报