MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

3 finger touch is being swallowed by MPAndroidChart

Open forkch opened this issue 11 years ago • 2 comments

I use MPAndroidChart within a special layout which processes a 3 finger touch events. But the touch event never reaches this special layout. The layout in question is the TelescopeLayout from https://github.com/mattprecious/telescope.

As far as I see it only two finger gestures are used by MPAndroidChart

forkch avatar May 15 '15 14:05 forkch

Well 3 finger gestures are more complicated when they have to live together with two finger gestures.

Think about the tap and double-tap gestures working together. The solution to that specific case is actually delaying the decision whether there was a tap, until we are sure that there weren't a double-tap! Which causes a huge annoying delay in mobile platforms.

Now here you have a one-finger drag, and a two finger scale. They both wait for a treshold to be passed before they decide to start "eating" the touches.

I think that what is missing here is just making the gestures aware that there might be gestures with more fingers involved - and thus stop counting towards the treshold if a 3rd finger was added (ACTION_POINTER_DOWN). Right now it looks for getPointerCount() >= 2 which is nice to allow the accidental extra finger, but we shouldn't allow it if it were added before passing the treshold.

You can play with that a little and see if it solves the problem, and then send a PR ;-)

danielgindi avatar May 19 '15 12:05 danielgindi

Well said Daniel :-), could not agree more!

PhilJay avatar May 20 '15 14:05 PhilJay