新建RotateAnimationZ
import android.graphics.Camera;
import android.graphics.Matrix;
import android.view.animation.Animation;
import android.view.animation.Transformation;
public class RotateAnimationZ extends Animation {
int centerX, centerY;
Camera camera = new Camera();
public final int X = 0;
public final int Y = 1;
public int direction = Y;
public boolean isZhengfangxiang = true;
@Override
public void initialize(int width, int height, int parentWidth, int parentHeight) {
super.initialize(width, height, parentWidth, parentHeight);
//获取中心点坐标
centerX = width / 2;
centerY = height / 2;
}
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
super.applyTransforma