Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit e50751e

Browse files
committed
feat: Correct touch event when mvideoItem == null;
1 parent b612958 commit e50751e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ open class SVGAImageView : ImageView {
256256

257257
@SuppressLint("ClickableViewAccessibility")
258258
override fun onTouchEvent(event: MotionEvent?): Boolean {
259+
if (mVideoItem == null) {
260+
return super.onTouchEvent(event)
261+
}
259262
event?.let {
260263
if(event.action == MotionEvent.ACTION_DOWN){
261264
val drawable = drawable as? SVGADrawable ?: return false
@@ -267,9 +270,6 @@ open class SVGAImageView : ImageView {
267270
}
268271
}
269272
}
270-
271-
272-
273273
}
274274
}
275275

0 commit comments

Comments
 (0)