获取Android的中心坐标

获取屏幕的中心x,y坐标,代码如下:

Display display = getWindowManager().getDefaultDisplay();
final Point size = new Point();
display.getSize(size);
height = size.y;
float centerY=height/2;//i expect this is the y coordinate of center

但是没有反应。

SomeImageView.setY(centerY);

没看到屏幕的中心坐标在哪儿。

获得屏幕的长宽
然后长宽除2不就是 中心坐标

只setY,不setX怎么能看到中心坐标呢