Android ValueAnimator ImageView animate() rotation,Kotlin
Kotlin
private fun myAnim() {
val mDuration = 450L
var animatedValue: Float
val valueAnimator = ValueAnimator.ofFloat(0f, 1f)
valueAnimator.duration = mDuration
valueAnimator.interpolator = LinearInterpolator()
valueAnimator.addUpdateListener(object : ValueAnimator.AnimatorUpdateListener {
override fun onAnimationUpdate(animation: ValueAnimator) {
animatedValue = animation.animatedValue as Float
mImageView?.animate()?.rotation(90 * animatedValue)
}
})
valueAnimator.start()
}