Commit f17bcbd
authored
[Android] Fix wrong reported number of pointers (#4218)
## Description
Fixes
#3435
Android includes the pointer being lifted in the `ACTION_POINTER_UP`
event, so the event where the pointer is lifted is sent with
`numberOfPointers = 2`. This PR changes that so the `numberOfPointers`
is reported as `n - 1` for `ACTION_POINTER_UP` events.
Note: The same applies to `ACTION_UP` and `ACTION_CANCEL` but I didn't
include them to keep the behavior the same as on iOS.
## Test plan
Reproducer from
#34351 parent 818dba6 commit f17bcbd
1 file changed
Lines changed: 4 additions & 1 deletion
File tree
- packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
| |||
0 commit comments