首页 > 其他 > 详细

实现等待动画

时间:2016-03-27 15:31:57      阅读:228      评论:0      收藏:0      [点我收藏+]

首先在res/raim下新建Tips,指定一些属性。?

技术分享

?其中 duration=1000 表示1秒转一圈

startOffset表示两圈之间的间隔时间

repeatCount =-1表示不停止的持续转

Pivotx表示绕中心转

在Activity中

private ImageView infoOperatingIV;?

operatingAnim = AnimationUtils.loadAnimation(thisR.anim.tips);

LinearInterpolator lin = new LinearInterpolator();

?operatingAnim.setInterpolator(lin);//设置旋转速度为匀速?

 

infoOperatingIV =new ImageView(ValidatePhoneActivity.this);

infoOperatingIV.setImageResource(R.drawable.wait);?

//开始旋转if (operatingAnim != null){ infoOperatingIV.startAnimation(operatingAnim);

}?

技术分享

实现等待动画

原文:http://www.cnblogs.com/rainhome/p/5325646.html

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