As i understand that when we pass int[2] location array into view.getLocationOnScreen(location), we will get left,top coordinates of that view. But when i debug this function, i see that location return for right,top coordinates of that view. my screen is 480x800, i margin right for view is 40, so the right coordinate of view is 440 , it equal to location[0] return from view.getLocationOnScreen(location). Why location[0] return for right coordinate of view?
it is exact return for left,top coordinates of that view. I get wrong value because my view still not rendered before i call view.getLocationOnScreen(location).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With