上代码:
//控件 图片
aa = (ImageView)findViewById(R.id.aa);
//设置图片
float translationY = aa.getTranslationY();
ObjectAnimator translation = ObjectAnimator.ofFloat(aa, "translationY", translationY, 500f);//设置位移,从0,view的宽度到0,0
ObjectAnimator alpha = ObjectAnimator.ofFloat(aa, "alpha", 0f, 1f);//设置透明度从0-1
ObjectAnimator rotation = ObjectAnimator.ofFloat(aa, "rotation", 0f, 360f);//以某点旋转360度
ObjectAnimator scaleY = ObjectAnimator.ofFloat(aa, "scaleY", 2f, 1f);
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.play(rotation).with(alpha).with(scaleY).with(translation);
//设置时间
animatorSet.setDuration(3000);
animatorSet.start();//开始动画