3

This question shows how you set listeners for an android view animation, but it doesn't work for property animations.

How can I achieve the same thing with a property animation?

my animation:

ViewPropertyAnimator viewPropertyAnimator = layout.animate().y(integer).setInterpolator(interpolator).setStartDelay(delay).setDuration(duration);
Community
  • 1
  • 1
anonymos
  • 167
  • 2
  • 14
  • 1
    check this one may help, http://stackoverflow.com/questions/32283074/android-rotateanimation-completed/32283142#32283142 – Androider Sep 10 '15 at 10:12

1 Answers1

9

Try this:

viewPropertyAnimator.setListener(new Animator.AnimatorListener() {
                @Override
                public void onAnimationStart(Animator animation) {

                }

                @Override
                public void onAnimationEnd(Animator animation) {

                }

                @Override
                public void onAnimationCancel(Animator animation) {

                }

                @Override
                public void onAnimationRepeat(Animator animation) {

                }
            });
shhp
  • 3,653
  • 2
  • 18
  • 23