RotateAnimation rotate = new RotateAnimation("起始角度", "旋转角度",
"旋转中心x轴 一般,view.getPivotX()", "旋转中心Y轴 view.getPivotY");
LinearInterpolator lin = new LinearInterpolator();
rotate.setInterpolator(lin);//动画效果 拦截器非必须设置
rotate.setDuration();//设置动画持续周期
rotate.setRepeatCount(0);//设置重复次数 0关闭
rotate.setFillAfter(true);//动画执行完后是否停留在执行完的状态
rotate.setStartOffset(waitTime);//执行前的等待时间
其中View旋转中心,通过以下属性设置,在xml中
android:transformPivotX,android:transformPivotY,其获取对应View.getPivotX() ,View.getPivotY()
android:rotation 默认以View中心旋转,可通过如上方式修改旋转中心!