Hi, I am trying to animate the title follow the implementation of animateBackdrop
Here is my code:
private fun animateTitle() {
val finalY = binding.title.y
val startY = finalY.minus(40)
binding.title.y = startY
val animator = ValueAnimator.ofFloat(startY, finalY)
animator.duration = 1000
animator.addUpdateListener {
val animatedValue = it.animatedValue as Float
binding.title.translationY = animatedValue
}
animator.start()
}
and invoke after animateSummary().
However, I the actual position of the title after the animation is not collect, and I cannot figure out the reason, could anybody tell me the reason why it will moved to the wrong position?
Thanks.