安卓(Android) 怎么获取路径动画(Animation)中的注释

2019年10月16日23:01:38安卓(Android) 怎么获取路径动画(Animation)中的注释已关闭评论 259 1156字阅读3分51秒

1.简介

安卓(Android) 怎么获取路径动画(Animation)中的注释?——请看下文。

2.示例代码

/**
 * 版权所有 编程十万个怎么办(www.tah1986.com)
 */



import android.view.animation.Animation;
import android.view.animation.AnimationSet;

import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;

import android.view.animation.TranslateAnimation;

public class Main {
    static public Animation notesInPathAnimation() {

        AnimationSet animationSet = new AnimationSet(true);
        RotateAnimation rotate_360 = new RotateAnimation(0, 720,
                Animation.RELATIVE_TO_SELF, 0.5f,
                Animation.RELATIVE_TO_SELF, 0.5f);
        rotate_360.setDuration(900);
        rotate_360.setInterpolator(new LinearInterpolator());

        Animation step1 = new TranslateAnimation(Animation.ABSOLUTE, -580,
                Animation.ABSOLUTE, -520, Animation.ABSOLUTE, 720,
                Animation.ABSOLUTE, 200);
        step1.setDuration(300);
        step1.setInterpolator(new LinearInterpolator());

        Animation inFromLeft = new TranslateAnimation(Animation.ABSOLUTE,
                0, Animation.ABSOLUTE, 520, Animation.ABSOLUTE, 0,
                Animation.ABSOLUTE, -200);
        inFromLeft.setDuration(500);
        inFromLeft.setInterpolator(new LinearInterpolator());
        animationSet.addAnimation(rotate_360);
        animationSet.addAnimation(step1);
        animationSet.addAnimation(inFromLeft);

        return animationSet;

    }
}

 
继续阅读
编程十万个怎么办