Bootstrap

Android ValueAnimator ImageView animate() rotation,Kotlin

Android ValueAnimator ImageView animate() rotation,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()
    }

 

 

 

Android ValueAnimator属性动画ObjectAnimator使View颜色渐变,Kotlin_view动画 渐变-CSDN博客文章浏览阅读646次,点赞8次,收藏8次。Android ValueAnimator属性动画ObjectAnimator使View颜色渐变,Kotlin。_view动画 渐变https://blog.csdn.net/zhangphil/article/details/135255049https://blog.csdn.net/zhangphil/article/details/135255049

 

;