getLocationInWindow sens me a wrong y coordinate
- by user1805792
When i try to get the position where i touch on an imageviewer with this code, the y position of my touch is lower than the y position that getLocationInWindows gives, so there must be something wrong
int[] viewCoords = new int[2];
miViewer.getLocationInWindow(viewCoords);
int touchX=(int)event.getX();
int touchY=(int)event.getY();
int imageX = touchX - viewCoords[0];
int imageY = touchY - viewCoords[1];