ObjectAnimator translationX=ObjectAnimator.ofFloat(ivimg,"translationX",0f,200f); ObjectAnimator rotationr=ObjectAnimator.ofFloat(ivimg,"rotation",0f,360f); ObjectAnimator alpha=ObjectAnimator.ofFloat(ivimg,"alpha",1f,0f); ObjectAnimator scaleY=ObjectAnimator.ofFloat(ivimg,"scaleY",1f,3f); ObjectAnimator scaleX=ObjectAnimator.ofFloat(ivimg,"scaleX",1f,3f,1f); AnimatorSet animatorSet=new AnimatorSet(); animatorSet.play(alpha).with(scaleY).with(scaleX).with(rotationr).with(translationX); animatorSet.setDuration(2000); animatorSet.start();
Android之属性动画
最新推荐文章于 2018-07-06 16:09:36 发布