画面の中心の 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);
画面中央に見えません。誰でもこれで私を助けることができますか?
ありがとう