views:

41

answers:

1

Hey Guys,

I've got an onTouchEvent boolean on a Surfaceview, I've got openGL objects drawn on the view and I'm wondering is there anyway to detect where on the screen the onTouch happened? e.g (x,y) co-ordinates.

+1  A: 

Use event.getX() and event.getY() assuming that you have the following method signature:

  public boolean onTouch(View view, MotionEvent event)
Roflcoptr