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

相关推荐
solo_9912 小时前
用 LSPosed 模拟录屏音频编码器卡顿:从思路到落地
android
zzq779712 小时前
别把大模型 API Key 写进 APK:移动 AI 应用接口防盗刷实践
android·人工智能·安全·app加固·御盾安全·安卓加固
xiaopang14 小时前
RK3568 AOSP 编译与快速部署实战
android
程序员正茂15 小时前
Android工程中使用ncnn进行yolo识别
android·yolo·ncnn
码农coding15 小时前
android12 SystemUI之通知
android
summerkissyou198715 小时前
android - 性能 - Perfetto - cpu 分析教程及例子
android·性能
AFinalStone17 小时前
Android 7系统休眠唤醒(七)内核层—wakelock与autosleep机制
android·休眠唤醒
starvapour17 小时前
在关机键损坏的情况下让手机关机
android·adb·手机
AFinalStone18 小时前
Android 7系统休眠唤醒(八)内核层—Alarm定时唤醒与硬件唤醒源
android·电源管理·休眠唤醒