属性动画

2019-07-13  本文已影响0人  小慧sir
//    <alpha/>
//    <translate/>
//    <scale/>
//    <rotate/>
        ObjectAnimator alpha = ObjectAnimator.ofFloat(mImageDd, "alpha", 0, 1);
        ObjectAnimator translationY = ObjectAnimator.ofFloat(mImageDd, "TranslationY", 0, 360);
        ObjectAnimator scaleY = ObjectAnimator.ofFloat(mImageDd, "scaleY", 0, 1);
        ObjectAnimator rotation = ObjectAnimator.ofFloat(mImageDd, "Rotation", 0, 360);
        AnimatorSet animatorSet = new AnimatorSet();
        animatorSet.setDuration(5000);
        animatorSet.play(alpha).with(translationY).with(scaleY).with(rotation);
        animatorSet.start();
上一篇下一篇

猜你喜欢

热点阅读