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

Commit

Permalink
feat: Correct touch event when mvideoItem == null;
Browse files Browse the repository at this point in the history
  • Loading branch information
errnull committed Jan 9, 2020
1 parent b612958 commit e50751e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ open class SVGAImageView : ImageView {

@SuppressLint("ClickableViewAccessibility")
override fun onTouchEvent(event: MotionEvent?): Boolean {
if (mVideoItem == null) {
return super.onTouchEvent(event)
}
event?.let {
if(event.action == MotionEvent.ACTION_DOWN){
val drawable = drawable as? SVGADrawable ?: return false
Expand All @@ -267,9 +270,6 @@ open class SVGAImageView : ImageView {
}
}
}



}
}

Expand Down

0 comments on commit e50751e

Please sign in to comment.