Often I use ViewPropertyAnimator and set end action using its withEndAction() function like:
view.animate().translationY(0).withEndAction(new Runnable() {
@Override
public void run() {
// do something
}
}).start();
But also you can set end action setting special listener like:
view.animate().translationY(0).setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
// do something
}
});
So what is the difference between these two approaches and when I should use each of them?