private Animation createAnimation(int top, AnimationListener l) {
AnimationSet set = new AnimationSet(false);
set.addAnimation(startAlpha());
set.addAnimation(startScale());
int duration = (int) (Math.random() * 10000 + 3000);
set.addAnimation(randomRotate(duration));
set.addAnimation(randomScale());
set.addAnimation(endScale(duration));
//添加的顺序很重要,TranslateAnimation必须在ScaleAnimation的后面,否则会出现奇怪的现象
set.addAnimation(randomTranslate(top, duration, l));
set.addAnimation(randomTranslateX());
set.addAnimation(endAlpha(duration));
return set;
}
WelcomeSnowActy.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:QMark
作者:
评论列表
文章目录