作用:旋转动画

<?xml version="1.0" encoding="utf-8"?>

android:pivotX:缩放中心坐标的X值,取值类型有三种:数字;百分比;百分比+“p”;
android:pivotY*:缩放中心坐标的Y值;同上
android:duration:动画持续时长
android:interpolator:动画插值器。是实现动画不规则运动的一种方式;(先占个位置)
android:fillAfter:动画结束之后是否保持动画的最终状态;true,表示保持动画的最终状态
android:fillBefore:动画结束之后是否保持动画开始前的状态;true,表示恢复到动画开始前的状态
android:repeatCount:动画重复的次数。指定动画重复播放的次数,如果你需要无限循环播放,请填写一个小于0的数值,一般写-1
android:repeatMode:动画重复的Mode,有reverse和restart两种
android:startOffset:动画播放延迟时长,调用start之后延迟多少时间播放动画
android:duration:动画持续时长,毫秒为单位
android:fromDegrees:动画开始的角度
android:toDegrees:动画旋转的目标角度

使用方法:
1.xml 使用方式
RotateAnimation rotateAnimation = (RotateAnimation) AnimationUtils.loadAnimation(this,R.anim.my_rotate);
imageView.startAnimation(rotateAnimation);
2.代码使用方式

RotateAnimation rotateAnimation = new RotateAnimation(0f, 360f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
rotateAnimation.setFillAfter(true);// 设置保持动画最后的状态  
rotateAnimation.setDuration(3000);// 设置动画时间  
rotateAnimation.setRepeatCount(-1);//设置重复次数
imageView.startAnimation(rotateAnimation);

更多相关文章

  1. Android 动画标签——translate
  2. android动画源码合集、动态主题框架、社交app源码等
  3. Android隐藏状态栏和标题栏
  4. Android 无闪烁启动画面程序源码
  5. android图片切换ImageSwichter的动画切换效果
  6. Android动画学习
  7. Android中的drawable state的各种状态
  8. android logo:内核、android开机动画
  9. Android百分比布局:PercentFrameLayout

随机推荐

  1. the bind value at index 2 is null
  2. 通过CMD 查看android APP数据库表
  3. Android GPS坐标距离计算
  4. android开发之android:process属性_appli
  5. android camera的基本使用
  6. Android -- 生成二维码
  7. 【Android Camera】Android层测试摄像头
  8. Android UI学习 -网址列表
  9. android点亮(唤醒)屏幕
  10. Android集成okhttp