Closed damoasda closed 3 years ago
I know this bug from the emulator. I'm going to merge it.
But I have a little problem with your 1st PR:
If you tap a game piece a short time it will rotate. That's perfect.
But if you tap longer the 'drag game piece' appears. But the player wants to rotate and not to drag. Possible solution: we should measure the time and/or the movement distance to distinguish between clicking and dragging. There's already similar code in the class mentioned by me in the PR (~ ClusterTouchListener ?).
I can grant you non-master push rights if you want, for easier working.
But if you tap longer the 'drag game piece' appears. But the player wants to rotate and not to drag.
I can rarely see the piece disappear problem on my phone and it never happens in my emulator. :disappointed: I tested several dozens of times and the events (ACTION_UP vs. ACTION_MOVE) were always generated correctly in my emulator (Android 11).
Does this pull request fix the problem for you? Or do you still face the problem after the merge?
Possible solution: we should measure the time and/or the movement distance to distinguish between clicking and dragging. There's already similar code in the class mentioned by me in the PR (~ ClusterTouchListener ?).
This would assume that Android generated wrong events. I prefer to identify the root cause before we implement a workaround which makes the code difficult and hard to test.
I can grant you non-master push rights if you want, for easier working.
Thank you for the offer, that's not necessary, I can do everything I need to do with my fork repository.
I will get back to you later.
During my last change (ce67a0) your change has changed a bit. The index is known there.
If a piece is pressed for a longer time and probably moved a few pixels it disappears (is hidden) sometimes, see #14 for more details.
This pull request should fix the issue.