I would like to get position X or Y of view (ie button) programmatically but in solutions from link (https://blog.takescoop.com/android-view-measurement-d1f2f5c98f75) returned values are wrong.
I need this to restrain y in animation for clamp function.
Also I have problems to get height and width programmatically. I can get view like here (https://stackoverflow.com/a/24035591/9498656 by view.post(new Runnable()) but like before values are wrong.
problem: animated view with restrictions on other view Y
Could someone explain how get X Y height width for different screens?