I am developing a game in which there are a couple of on-screen
buttons
the user can press to do different things. These work by responding
to
onSingleTapConfirmed, and checking if the getX and getY of the event
are
within the coordinates of the buttons.

However, the getX and getY coordinates are different when the game is
played on other screen sizes than the game was developed on.

How is the best way to deal with that? Of course I could call
getWidth
and getHeight and do lots of if's on them, but it would be better to
have a more general way of doing it.

Does anyone know of such a way?

The game is implemented on a GLSurfaceView.

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to