首页 > 移动平台 > 详细

android中的animation动画左右摇摆晃动

时间:2015-01-26 15:09:30      阅读:1831      评论:0      收藏:0      [点我收藏+]

左右摇摆的原理,就是向一个方向移动,然后设置反方向的属性。再设置重复次数。

TranslateAnimation animation = new TranslateAnimation(0, -5, 0, 0);
		animation.setInterpolator(new OvershootInterpolator());
		animation.setDuration(100);
		animation.setRepeatCount(3);
		animation.setRepeatMode(Animation.REVERSE);
		login_layout.startAnimation(animation);

对于这个login_layout,他是个view.就行。

android中的animation动画左右摇摆晃动

原文:http://blog.csdn.net/howlaa/article/details/43152309

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!