Hello everyone, I am developing a game that uses a fullscreen GL view and getting its motion events with onTouchEvent(), nothing fancy. When I test on a Samsung "Vibrant" (Galaxy S), the coordinates I get from the motion event are slightly off. The top,left corner is around x=20,y=20 and the bottom,right something like x=780,y=460 . The Galaxy S's screen is 800x480, which is also the view size, as configured, and also as measured with getWidth() / getHeight(). The view isn't off, getX() and getY() both return 0.
The device uses soft-keys, that are part of the touchscreen surface but not the game's. It seems that the touch events return coordinates in a space that spans the entire screen, including the borders and the soft keys area. They don't map pixel for pixel to the game's surface. I am assuming that I've done something really stupid but I've been looking for hours and trying to google for an answer for hours as well. Since noone else seems to have the issue, it must be something I'm doing. I also tried a fellow developer's game on the same device tracing touch events and I also get the same coordinate range, though. Can you tell me what I could be doing wrong? Is there a way to read the min/max coordinates that should be expected for the fullscreen GL view so I can rescale? or a way to get properly translated events? Thanks in advance! Best regards, Emmanuel -- 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