public static Animation shakeAnimation(int X) {
AnimationSet set = new AnimationSet(true);
Animation anim1 = getTranslateAnimation(0, -200, 0, 0, 100);
anim1.setStartOffset(100);
set.addAnimation(anim1);
Animation anim2 = getTranslateAnimation(-200, 400, 0, 0, 200);
anim2.setStartOffset(300);
set.addAnimation(anim2);
Animation anim3 = getTranslateAnimation(400, -200, 0, 0, 200);
anim3.setStartOffset(500);
set.addAnimation(anim3);
Animation anim4 = getTranslateAnimation(-200, 0, 0, 0, 100);
anim4.setStartOffset(600);
set.addAnimation(anim4);
set.setFillAfter(true);
set.setDuration(640);
return set;
}
KJAnimations.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:OSchina_resources_android
作者:
评论列表
文章目录