属性动画 组合跳转界面

xml

`

【属性动画 组合跳转界面】代码实现
private void initDongHua() {Animator alpha = ObjectAnimator.ofFloat(mImage, "alpha", 0, 1); // alpha 透明度Animator scaleX = ObjectAnimator.ofFloat(mImage, "scaleX", 1, 0.5f); // scaleX 横向缩放 // scaleY 纵向缩放Animator rotationX = ObjectAnimator.ofFloat(mImage, "rotationX", 0, 360); //rotationX横向旋转 //rotationY纵向旋转Animator translationX = ObjectAnimator.ofFloat(mImage, "translationX", -100, 0); //translationX横向平移 //translationY纵向平移AnimatorSet animatorSet = new AnimatorSet(); animatorSet.setDuration(4000); // 时长 animatorSet.playTogether(alpha, scaleX, rotationX, translationX); animatorSet.start(); // 跳转Activity animatorSet.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { Intent intent =new Intent(MainActivity.this,Main2Activity.class); startActivity(intent); super.onAnimationEnd(animation); } }); }

    推荐阅读