When I study Chap 2.3, I’ve got a question.
When declaring alphaAnimator, we already set animation for alpha at progressBar.
val alphaAnimator = ObjectAnimator.ofFloat(
binding.progressBar,
"alpha",
0f,
1f
)
But we add updateListener for alphaAnimation and set alpha again.
alphaAnimator.addUpdateListener {
binding.progressBar.alpha = it.animatedValue as Float
}
As I understand, “the behavior of adding updateListener” and “the behavior not adding it” are the same.
What I understand is right?
Is there any strength for adding “updateListener”?