diff --git a/signature-pad/src/main/java/com/github/gcacace/signaturepad/views/SignaturePad.java b/signature-pad/src/main/java/com/github/gcacace/signaturepad/views/SignaturePad.java index a86e77d..bde00d4 100644 --- a/signature-pad/src/main/java/com/github/gcacace/signaturepad/views/SignaturePad.java +++ b/signature-pad/src/main/java/com/github/gcacace/signaturepad/views/SignaturePad.java @@ -208,7 +208,11 @@ public boolean onTouchEvent(MotionEvent event) { case MotionEvent.ACTION_DOWN: getParent().requestDisallowInterceptTouchEvent(true); mPoints.clear(); - if (isDoubleClick()) break; + if (isDoubleClick()) { + this.clearView(); + setIsEmpty(true); + break; + } mLastTouchX = eventX; mLastTouchY = eventY; addPoint(getNewPoint(eventX, eventY)); @@ -411,7 +415,6 @@ private boolean isDoubleClick() { } else if (mCountClick == 2) { long lastClick = System.currentTimeMillis(); if (lastClick - mFirstClick < DOUBLE_CLICK_DELAY_MS) { - this.clearView(); return true; } }