【问题标题】:what is the meaning of getDialog.getWindow in android?android中getDialog.getWindow的含义是什么?
【发布时间】:2014-03-18 12:20:31
【问题描述】:

我阅读了一些代码,其中对话框的 x,y 坐标设置如下:

WindowManager.LayoutParams p = getWindow().getAttributes();
p.y = location[1] + switchSelector.getHeight();
int switchSelectorMidBottomXPosition = switchSelector.getWidth() / 2 + location[0];
p.x = switchSelectorMidBottomXPosition - mToolTipLayout.getWidth() + 2 * pxsRightToArrow;

getDialog.getWindow 是什么意思?

为什么不只布局getDialogparams

【问题讨论】:

    标签: java android android-layout layout dialog


    【解决方案1】:

    getDialog() 只是从 DialogFragment 返回私有变量 mDialog。而 getDialog.getWindow 是手动的,似乎具有新设置的大小对话框。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-02
      相关资源
      最近更新 更多