Skip to content

Commit ef139bd

Browse files
committed
fix(android): edge case where gesture would not be recognized (view half way hidden)
1 parent 39699b1 commit ef139bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ public boolean isWithinBounds(View view, float posX, float posY) {
413413
}
414414
float left = sClipRect.left;
415415
float top = sClipRect.top;
416-
float right = sClipRect.right - sClipRect.left;
417-
float bottom = sClipRect.bottom - sClipRect.top;
416+
float right = left + sClipRect.right - sClipRect.left;
417+
float bottom = top + sClipRect.bottom - sClipRect.top;
418418
if (mHitSlop != null) {
419419
float padLeft = mHitSlop[HIT_SLOP_LEFT_IDX];
420420
float padTop = mHitSlop[HIT_SLOP_TOP_IDX];

0 commit comments

Comments
 (0)