-1

I have a problem with OnGestureListener and OnTouchListener. When I run a service with WindowManager has onTouchListener on a Actvitiy that has onGestureListener. I cannot get MotionEvents before the Gestures.

How can I set priority for onTouchListener to get MotionEvents before?

NobodyNada
  • 7,529
  • 6
  • 44
  • 51
reigeki
  • 391
  • 1
  • 5
  • 19

1 Answers1

0

I believe it's because OnGestureListener has the chance to consume touch events before OnTouchListener. If you're the one setting the OnGestureListener, then just override the methods that you want to be passed to your OnTouchListener and have them return false.

For example:

@Override
public boolean onSingleTapUp(MotionEvent event) {
    return false;
}
Tony J Huang
  • 774
  • 1
  • 5
  • 11