Skip to content

Commit

Permalink
Merge pull request #63 from tushar-acharya/fix/handle-cancel-touch-event
Browse files Browse the repository at this point in the history
Reset pressed state on ACTION_CANCEL touch event
  • Loading branch information
jd-alexander authored Sep 8, 2017
2 parents 685289c + d4ceb0a commit 4600169
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions likebutton/src/main/java/com/like/LikeButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ public boolean onTouchEvent(MotionEvent event) {
setPressed(false);
}
break;
case MotionEvent.ACTION_CANCEL:
setPressed(false);
break;
}
return true;
}
Expand Down

0 comments on commit 4600169

Please sign in to comment.