Skip to content

Commit fb87221

Browse files
authored
Merge pull request svga#223 from yyued/2.5.3-fixIssue
feat: Correct touch event when mvideoItem == null;
2 parents 503a6f0 + e50751e commit fb87221

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

+3-3
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)