Question

I would like to know on how to detect on which part of the screen did the user touch it, not necessarily specific, just the direction(NORTH,SOUTH,EAST,WEST) from the middle point of the screen. Would it also affect the orientation of the screen if ever? I am using a landscape orientation.

Was it helpful?

Solution

Fetch the coordinates of the touch (getX() & getY()) and compare it to the center point of your screen. This should give you a nice hint on the 'direction' of your touch.

Hope I understood the question. JQCorreia

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top