diff --git a/android/lib/src/main/java/com/swmansion/gesturehandler/LongPressGestureHandler.java b/android/lib/src/main/java/com/swmansion/gesturehandler/LongPressGestureHandler.java index b53848e0fc..7d64d309ba 100644 --- a/android/lib/src/main/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +++ b/android/lib/src/main/java/com/swmansion/gesturehandler/LongPressGestureHandler.java @@ -35,12 +35,16 @@ protected void onHandle(MotionEvent event) { mStartX = event.getRawX(); mStartY = event.getRawY(); mHandler = new Handler(); - mHandler.postDelayed(new Runnable() { - @Override - public void run() { - activate(); - } - }, mMinDurationMs); + if (mMinDurationMs > 0) { + mHandler.postDelayed(new Runnable() { + @Override + public void run() { + activate(); + } + }, mMinDurationMs); + } else if (mMinDurationMs == 0) { + activate(); + } } if (event.getActionMasked() == MotionEvent.ACTION_UP) { if (mHandler != null) {