ViewPropertyAnimator without start call, is there any difference?
Sometimes I see code like
view.animate().alpha(1).start();
And sometimes
view.animate().alpha(1);
What (if any) is the difference?
The animation always starts, but from my understanding of the source code, two completely different things happen in the background before it happens depending on the initial call.
+3
source to share
1 answer
public void start ()
Runs the currently pending property animation immediately. calling start () is optional, because all animations start automatically on the next opportunity. However, if the animation is needed to run immediately and synchronously (not at the time the next event is being handled by the hierarchy, when the animation starts otherwise), then this method can be used.
The only difference is that it starts right away on startup.
+2
source to share