Reputation: 951
I know how to use AnimatorSet to chain animations, ie. play animation 1 -> play animation 2
but I don't know how to achieve this for ViewPropertyAnimator? should I use "withEndAction" or should I use "setListener..onAnimationEnd" or something else?
thanks. BR, Henry
Upvotes: 2
Views: 1424
Reputation: 1006584
withEndAction()
should work, but is only available from API Level 16 onwards.
If you want something that works on older versions, including via the NineOldAndroids backport, use setListener()
and onAnimationEnd()
. Note that AnimatorListenerAdapter
implements all of AnimatorListener
's methods, so you can extend AnimatorListenerAdapter
and only override those methods that you need.
Upvotes: 6