Fix animation coordinates

This commit is contained in:
PavelRatushny 2017-11-24 18:44:50 +02:00
parent 0903209f1c
commit 07c073413c

View file

@ -284,9 +284,11 @@ public class AndroidUtils {
decorView.setSystemUiVisibility(uiOptions);
}
public static int[] getViewLocation(View view) {
public static int[] getCenterViewCoordinates(View view) {
int[] coordinates = new int[2];
view.getLocationOnScreen(coordinates);
coordinates[0] += view.getWidth() / 2;
coordinates[1] += view.getHeight() / 2;
return coordinates;
}