Skip to content

Commit f3e7612

Browse files
committed
removeAllUpdateListeners after animator cancel.
1 parent 9a526d5 commit f3e7612

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/src/main/java/com/opensource/svgaplayer/SVGAImageView.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ open class SVGAImageView : ImageView {
9797
override fun onDetachedFromWindow() {
9898
super.onDetachedFromWindow()
9999
animator?.cancel()
100+
animator?.removeAllUpdateListeners()
100101
}
101102

102103
fun loadAttrs(attrs: AttributeSet) {
@@ -194,6 +195,7 @@ open class SVGAImageView : ImageView {
194195

195196
fun stopAnimation(clear: Boolean) {
196197
animator?.cancel()
198+
animator?.removeAllUpdateListeners()
197199
(drawable as? SVGADrawable)?.let {
198200
it.cleared = clear
199201
}

0 commit comments

Comments
 (0)