属性动画

 float y=iv.getTranslationY();
        ObjectAnimator animator1=ObjectAnimator.ofFloat(iv,"translationY",y,-100);
        animator1.setDuration(5000);
        //animator1.start();
        ObjectAnimator animator2 = ObjectAnimator.ofFloat(iv, "scaleY", 1f, 0.5f, 2f, 1f);
        animator2.setDuration(5000);
        //animator2.start();
        AnimatorSet set=new AnimatorSet();
        set.play(animator2).after(animator1);
        set.start();
        set.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                super.onAnimationEnd(animation);
            }
        });



你可能感兴趣的:(属性动画)