ObjectAnimator moveIn = ObjectAnimator.ofFloat(img, "translationY", -500f, 0f);//从上移动到下
ObjectAnimator rotateX = ObjectAnimator.ofFloat(img, "rotationX", 0f, 360f);//旋转一周
ObjectAnimator fadeInOut = ObjectAnimator.ofFloat(img, "alpha", 0f, 1f);//从完全透明到完全不透明
ObjectAnimator scaleX = ObjectAnimator.ofFloat(img, "scaleX", 2f, 1f);//从
ObjectAnimator scaleY = ObjectAnimator.ofFloat(img, "scaleY", 2f, 1f);
AnimatorSet animSet = new AnimatorSet();
animSet.play(rotateX).with(fadeInOut).with(moveIn).with(scaleX).with(scaleY);
animSet.setDuration(3000);
animSet.start();
ObjectAnimator rotateX = ObjectAnimator.ofFloat(img, "rotationX", 0f, 360f);//旋转一周
ObjectAnimator fadeInOut = ObjectAnimator.ofFloat(img, "alpha", 0f, 1f);//从完全透明到完全不透明
ObjectAnimator scaleX = ObjectAnimator.ofFloat(img, "scaleX", 2f, 1f);//从
ObjectAnimator scaleY = ObjectAnimator.ofFloat(img, "scaleY", 2f, 1f);
AnimatorSet animSet = new AnimatorSet();
animSet.play(rotateX).with(fadeInOut).with(moveIn).with(scaleX).with(scaleY);
animSet.setDuration(3000);
animSet.start();