You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow Android Rotation Gesture to continue after second Pointer Lift and Land (#3057)
## Description
On iOS Rotation Gesture is not getting finished/cancelled when one of
two Pointers lifts up, allowing the Gesture to continue when a new
second Pointer arrives
On Android this behaviour differs – Rotation Gesture finishes whenever
one of two Pointers lifts up, requiring to land 2 completely new
Pointers in order to utilise Rotation Gesture again
I understand that this may be closer to default Android Gesture
Recogniser Behaviour, but find it unexpected and inconvenient
Thus in this PR I’m adding Ability to tell Rotation Gesture Builder to
enable iOS-like Behaviour, which allows Gesture Pause/Remain when second
Pointer lifts/lands
Additionally, I added some local toggleable Logs, which I find useful
for Debugging, but I’m not sure if it aligns with this Repo Style Guide
(or could noticeably reduce Performance) – please notify me, if it’s
prohibited
I think this Change may be usable for Gesture Handler Users, thus trying
to push it to the Gesture Handler (not only my own Fork) and looking
forward to any Feedback regarding both Code – Implementation/Naming
and/or local Style Guide – and Docs, which I might’ve misaligned with
Attached Gifs display what I mean (first one shows current Behaviour,
second one – with new Modifier)
<img
src="https://github.com/user-attachments/assets/ef87aa99-db12-42a5-a5ef-1fed4b11f8ac"
width="260"/>
<img
src="https://github.com/user-attachments/assets/a8337925-e1e9-4862-a5ed-b3b5cd5dde31"
width="260"/>
## Test plan
1. Use `RotationGesture` without new Modifier
(`secondPointerLiftFinishesGesture(value: boolean)`) and see if it works
as expected (as before – Gesture finishes when one of two key Pointers
is lifted)
2. Use `RotationGesture` with new Modifier
(`secondPointerLiftFinishesGesture(value: boolean)`) and see if it works
as expected (Gesture doesn't finish when second Pointer is lifted and
continues when second Pointer is landed again)
0 commit comments