controlwear / virtual-joystick-android

This library provides a very simple and ready-to-use custom view which emulates a joystick for Android.
Apache License 2.0
350 stars 124 forks source link

Multi-touch gestures are not properly handled #28

Open ralismark opened 5 years ago

ralismark commented 5 years ago

The joystick (incorrectly) responds to touch gestures which do not start on it. See gif for example:

multi-touch

(red/blue lines from showing layout bounds)

I'm guessing that this is caused by onTouchEvent not tracking the pointer ID (see Handle multi-touch gestures)

RBOrtmann commented 5 years ago

I have a similar issue where the joystick doesn't respond to touch gestures that do start on it after another touch gesture has already begun somewhere else. I'd like to hold a button down to enable the joystick, but because of this problem, that's not possible.

RBOrtmann commented 5 years ago

I have a similar issue where the joystick doesn't respond to touch gestures that do start on it after another touch gesture has already begun somewhere else. I'd like to hold a button down to enable the joystick, but because of this problem, that's not possible.

I fixed this by having the joystick ask for focus on MotionEvent.ACTION_DOWN on another View.