@@ -142,7 +142,6 @@ open class SVGAImageView @JvmOverloads constructor(context: Context, attrs: Attr
142
142
drawable.cleared = false
143
143
drawable.scaleType = scaleType
144
144
drawable.videoItem.init (width, height)
145
- Log .d(" SVGAImageView" , " height:$height width:$width " )
146
145
}
147
146
148
147
private fun getSVGADrawable (): SVGADrawable ? {
@@ -189,14 +188,12 @@ open class SVGAImageView @JvmOverloads constructor(context: Context, attrs: Attr
189
188
callback?.onFinished()
190
189
// 不是循环播放时,手动停止一下
191
190
if ((animation as ValueAnimator ).repeatCount <= 0 ) {
192
- Log .d(" ## onAnimationEnd" , " onFinished" )
193
191
// 要根据用户设置的 clearsAfterStop 状态判断,不可手动置 true
194
192
stopAnimation()
195
193
}
196
194
}
197
195
198
196
fun pauseAnimation () {
199
- Log .d(" ## pauseAnimation" , " " )
200
197
stopAnimation(false )
201
198
callback?.onPause()
202
199
}
@@ -206,8 +203,6 @@ open class SVGAImageView @JvmOverloads constructor(context: Context, attrs: Attr
206
203
}
207
204
208
205
fun stopAnimation (clear : Boolean ) {
209
- Log .d(" ## stopAnimation" , " cancel" )
210
-
211
206
mAnimator?.cancel()
212
207
mAnimator?.removeAllListeners()
213
208
mAnimator?.removeAllUpdateListeners()
@@ -288,21 +283,17 @@ open class SVGAImageView @JvmOverloads constructor(context: Context, attrs: Attr
288
283
289
284
override fun onAnimationRepeat (animation : Animator ? ) {
290
285
weakReference.get()?.callback?.onRepeat()
291
- Log .d(" ## onAnimationRepeat" , (animation as ValueAnimator ).repeatCount.toString())
292
286
}
293
287
294
288
override fun onAnimationEnd (animation : Animator ? ) {
295
- Log .d(" ## onAnimationEnd" , (animation as ValueAnimator ).repeatCount.toString())
296
289
weakReference.get()?.onAnimationEnd(animation)
297
290
}
298
291
299
292
override fun onAnimationCancel (animation : Animator ? ) {
300
- Log .d(" ## onAnimationCancel" , (animation as ValueAnimator ).duration.toString())
301
293
weakReference.get()?.isAnimating = false
302
294
}
303
295
304
296
override fun onAnimationStart (animation : Animator ? ) {
305
- Log .d(" ## onAnimationStart" , (animation as ValueAnimator ).duration.toString())
306
297
weakReference.get()?.isAnimating = true
307
298
}
308
299
} // end of AnimatorListener
@@ -312,8 +303,6 @@ open class SVGAImageView @JvmOverloads constructor(context: Context, attrs: Attr
312
303
private val weakReference = WeakReference <SVGAImageView >(view)
313
304
314
305
override fun onAnimationUpdate (animation : ValueAnimator ? ) {
315
- Log .d(" ## onAnimationUpdate" , (animation as ValueAnimator ).repeatCount.toString())
316
-
317
306
weakReference.get()?.onAnimatorUpdate(animation)
318
307
}
319
308
} // end of AnimatorUpdateListener
0 commit comments