ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(viewById, "translationY",viewById.getTranslationY(), 800);
ObjectAnimator objectAnimator1= ObjectAnimator.ofFloat(viewById,"rotation",0,360);
ObjectAnimator objectAnimator2 = ObjectAnimator.ofFloat(viewById,"alpha",0,1,0,1);
ObjectAnimator ObjectAnimator3 = ObjectAnimator.ofFloat(viewById, "scaleX", 0, 1);
animatorSet = new AnimatorSet();
animatorSet.play(objectAnimator).with(objectAnimator1).with(objectAnimator2).with(ObjectAnimator3);
animatorSet.setDuration(3000);
animatorSet.start();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
intent = new Intent(StartActivity.this, HomeActivity.class);
startActivity(intent);
}
},3000);
自定义动画
最新推荐文章于 2021-05-26 02:46:26 发布