1.常规的方式实现匿名内部类
valueAnimator.addUpdateListener(object :AnimatorUpdateListener {
override fun onAnimationUpdate(animation: ValueAnimator?) {
currentPoint = animation?.animatedValue as Point
postInvalidate()
}
})
2.lambda 表达式版本的匿名内部类
valueAnimator.addUpdateListener { animation ->
currentPoint = animation?.animatedValue as Point
postInvalidate()
}
---------------------
作者:gongjdde
来源:CSDN
原文:https://blog.csdn.net/gongjdde/article/details/77451424
版权声明:本文为博主原创文章,转载请附上博文链接!