ViewPropertyAnimator
suggest changeViewPropertyAnimator is a simplified and optimized way to animate properties of a View.
Every single View has a ViewPropertyAnimator object available through the animate() method. You can use that to animate multiple properties at once with a simple call. Every single method of a ViewPropertyAnimator specifies the target value of a specific parameter that the ViewPropertyAnimator should animate to.
View exampleView = ...;
exampleView.animate()
.alpha(0.6f)
.translationY(200)
.translationXBy(10)
.scaleX(1.5f)
.setDuration(250)
.setInterpolator(new FastOutLinearInInterpolator());
Note: Calling start() on a ViewPropertyAnimator object is NOT mandatory. If you don’t, the platform starts the animation on the next animation pass. Calling start() starts it immediately. FastOutLinearInInterpolator is android.support.v4.view.animation.FastOutLinearInInterpolator.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents