After switching to newer device i saw that, when i click something at the bottom of the screen it gives me the value of 480 even when the device height is 540.
it must be something with scaling, however i didin't find anything about that on the net
this is how i get screen dim:
void GetDisplaySize()
{
WindowManager wm = (WindowManager) this.getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
Point outSize = new Point();
display.getSize(outSize);
ScreenWidth = outSize.x;
ScreenHeight = outSize.y;
Log.d("ANDRO_ASYNC","W: "+Integer.toString(ScreenWidth));
Log.d("ANDRO_ASYNC","H: "+Integer.toString(ScreenHeight));
}
and how i get pointer location:
float X = event.getX(index);
float Y = event.getY(index);