Android ValueAnimator ImageView animate() rotation,Kotlin

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()
    }

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

相关推荐
前行的小黑炭39 分钟前
【Android】 Context使用不当,存在内存泄漏,语言不生效等等
android·kotlin·app
前行的小黑炭2 小时前
【Android】CoordinatorLayout详解;实现一个交互动画的效果(上滑隐藏,下滑出现);附例子
android·kotlin·app
用户20187928316714 小时前
Android黑夜白天模式切换原理分析
android
芦半山14 小时前
「幽灵调用」背后的真相:一个隐藏多年的Android原生Bug
android
卡尔特斯14 小时前
Android Kotlin 项目代理配置【详细步骤(可选)】
android·java·kotlin
ace望世界14 小时前
安卓的ViewModel
android
ace望世界14 小时前
kotlin的委托
android
CYRUS_STUDIO17 小时前
一文搞懂 Frida Stalker:对抗 OLLVM 的算法还原利器
android·逆向·llvm
zcychong17 小时前
ArrayMap、SparseArray和HashMap有什么区别?该如何选择?
android·面试
CYRUS_STUDIO17 小时前
Frida Stalker Trace 实战:指令级跟踪与寄存器变化监控全解析
android·逆向