ImageView の幅と高さを知る必要があります。フラグメントで測定する方法はありますか? 標準のアクティビティでは、これを使用します:
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
image.getWidth();
image.getHeight();
}
しかし、どこでimage.getWidth();
and image.getHeight();
in fragment を使用できますか?