Skip to content

Commit

Permalink
Reset pressed state on ACTION_CANCEL touch event
Browse files Browse the repository at this point in the history
  • Loading branch information
tushar-nallan committed Sep 7, 2017
1 parent 685289c commit d4ceb0a
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 d4ceb0a

Please sign in to comment.