渐变
ObjectAnimator animator = ObjectAnimator.ofFloat(textView, "alpha", 1,0,1);
以中心点旋转
ObjectAnimator animator = ObjectAnimator.ofFloat(textView, "rotation", 0,180,0);
public void setAlpha(float alpha)
//2、旋转度数:rotation、rotationX、rotationY
public void setRotation(float rotation)
public void setRotationX(float rotationX)
public void setRotationY(float rotationY)
//3、平移:translationX、translationY
public void setTranslationX(float translationX)
public void setTranslationY(float translationY)
//缩放:scaleX、scaleY
public void setScaleX(float scaleX)
public void setScaleY(float scaleY)
组合
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(alpha,scaleX);
//运行组合
animatorSet.start();