码迷,mamicode.com
首页 > 其他好文 > 详细

匀速不间断旋转动画

时间:2015-10-27 14:51:48      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:

xml:
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="2000"
    android:fromDegrees="0"
    android:pivotX="50%"
    android:pivotY="50%"
    android:repeatCount="infinite"
    android:repeatMode="restart"
    android:toDegrees="+359" >
</rotate>
 
代码:
mAnim = AnimationUtils.loadAnimation(this, R.anim.video_prepare_rotate);
  LinearInterpolator lir = new LinearInterpolator();
  mAnim.setInterpolator(lir);
  mVideoPrepareImg = (ImageView) findViewById(R.id.img_video_prepare);
  mVideoPrepareImg.startAnimation(mAnim);

匀速不间断旋转动画

标签:

原文地址:http://www.cnblogs.com/shenchanghui/p/4914116.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!