I've been searching for some function that can give me x,y coordinates of the the point where I touch on screen. I got a code of onTouch() but couldn't find a way to call that function.
public boolean onTouch(View v, MotionEvent event) {
int x = event.getX();
int y = event.getY();
return true;
}
What is View and MotionEvent that I'm supposed to pass in arguements? Can anyone please help me and tell me how to get just x,y of the point of touch?