android 获得当前view在屏幕的坐标

如何得到已经View在当前屏幕的坐标位置。(默认是指左上角的坐标)


final int[] location = new int[2];
view.getLocationOnScreen(location);
System.out.println("SA: mailBoxView current loation in screen : (" + location[0] + "," + location[1] +")" );


你可能感兴趣的:(android)