The following code is the actual code used in an test app, on a class that extends surfaceView.
@Override
public void onDraw(Canvas canvas)
{
canvas.drawCircle(touched_x, touched_y, 50, myPaint);
}
@Override
public boolean onTouchEvent(MotionEvent event)
{
touched_x = event.getX();
touched_y = event.getY();
return true;
}
It basically draws where your finger goes. To test if its tracking or not.
Adding a second finger, and you can still tracks your first. But add a 3rd, and it just stops. It doesnt matter what you do from there. Unless you remove all fingers and start again it wont track.
Now this is a problem since it sometimes thinks one finger is three! I can overcome this testing distance between fingers, but still, this doesnt resolve the problem.
When the third finger hits and it freezes tracking. It doesnt invoke action.Cancel.
Its vital that I know where and when the 1st finger is released.
However it thinks the last event was MotionEvent.ACTION_MOVE
. Not MotionEvent.ACTION_UP
or MotionEvent.ACTION_CANCEL
.
Currently since one finger can be three. My app just will seem like it failed to load a given image scroll.