0

I programm a gesture detector manually (I have my reasons) and listen to the onTouchEvent.

I was wondering why my picture was jumping around a bit sometimes and it turns out that on multitouch always getY(1) == getY(0), which is not the case according to finger position.

    float x0= event.getX(0);
    float x1= event.getX(1);
    float y0= event.getY(0); // it is virtually impossible to have y0=y1, but they are!
    float y1= event.getY(1);
    float x0r= event.getRawX(); // always like x0
    float y0r= event.getRawY(); // unknown value, not y0, not y1

Is there a known bug in getY(1)? How do I get the distance between the two points otherwise? getRaw does not have an index.

Gunnar Bernstein
  • 6,074
  • 2
  • 45
  • 67

1 Answers1

0

It turns out, this seem to be a feature. If the finger is set with a sliding move, the getY values will be 0. Program needs to handle that and ask a second time a bit later.

Gunnar Bernstein
  • 6,074
  • 2
  • 45
  • 67