I have a smartphone of 2560 x 1440 px. Now I am using this function for my TextView
:
int[] locationOnScreen = new int[2];
txtAp.GetLocationInWindow(locationOnScreen);
It is supposed to give me the total x and y coordinates in pixels.
My TextView
is pretty much in the middle of the screen, so supposedly at
(1280,770). But the function returns [69, 1111].
How can that be? If that is not the way of doing that, then what is?