Closed di72nn closed 1 month ago
I use motionEventSpy() instead of clickable() because it works much faster in this case.
Well, of course it works faster, but also incorrectly, because it doesn't wait for the motion to finish. And the motion can be canceled (something like that probably happens in the related issue).
Even simpler way to reproduce it is to touch the button, move your finger away from the button, and then release outside of the button. Any normal button doesn't register such events as clicks, but these navigation buttons do.
Yes, I know all the side effects. But I'm going by experience of use in each situation. This method worked well for years.
I'am sure there is a solution for LineageOS. Like 1px bottom padding or something else. I will try to fix that as soon as I get LinageOS.
The buttons are placed above the navigation. It's strange that motionEventSpy() is triggered. Perhaps we can also consider this to be a LinageOS bug.
In the worst case, we can make a special modifier for LinageOS.
Now that you mentioned it... I actually have the "navigation hint" (the bar) disabled, so there's zero space for navigation at the bottom. Enabling the "navigation hint" does resolve the issue (at least on crDroid). Maybe LineageOS has broken implementation, I don't have any device to compare (there are other implementations though - e.g., Samsung).
On my devices it works well even if the bar disabled.
Also, I want to say thank you! Glad to see someone managed to understand my code.
: )
Fix an issue with unwanted clicks when using gesture navigation. Fixes #58.