2

I'm using the NativeActivity for Android, and when my window creates I call:

ANativeWindow_setBuffersGeometry(g_AndroidEngine.app->window, 0, 0, format);

When I check the size of the window that gets created, it is created under the status bar. So if I output the touch coordinates at the upper left corner, it starts at status_bar_height. Is there a simple reason why this may have happened? Do I need a manifest line somewhere? I'm working on a Nexus 7 tablet, and any input is appreciated.

EDIT:

Reading this in the morning shows that I wasn't very clear. My application isn't relative to the status bar. It seems to exist under the status bar. So when I touch at a location that should be my application's upper left, I get (0, status_bar_height) instead of (0,0) which is what I would expect.

  • This is the expected behaviour. If you want to use fullscreen coordinates, the solution is plain simple: Switch to fullscreen view. – eozgonul Jan 23 '14 at 07:15
  • I don't want fullscreen coordinates, that's what I'm getting currently. I want coordinates relative to my window, which I though was the default behavior. – OvertCurrent Jan 23 '14 at 17:14
  • How do you get the coordinates? – eozgonul Jan 24 '14 at 07:19
  • I'm using the standard AMotionEvent_getX () and y. When I check the offsets they return zero, and there is some precision but not enough to make the distance. – OvertCurrent Jan 24 '14 at 14:45

0 Answers0