旋转动画 rotate

/**
* fromDegrees, 起始的角度
* toDegrees, 终点的角度
* pivotXType, 中心x轴的类型
* pivotXValue, 中心x轴的值
* pivotYType,
* pivotYValue
* @param view
*/
public void rotate(View view) {
RotateAnimation rotateAnimation = new RotateAnimation(0, -360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);

rotateAnimation.setDuration(3000);

imageView.startAnimation(rotateAnimation);
}

posted on 2017-09-03 19:11  葰葰  阅读(117)  评论(0编辑  收藏  举报