setWindow

open fun setWindow(window: Window?, gravity: Int = Gravity.NO_GRAVITY, widthRatio: Float = 0.85f, x: Int = 0, y: Int = 0, horizontalMargin: Float = 0.0f, verticalMargin: Float = 0.0f, horizontalWeight: Float = 0.0f, verticalWeight: Float = 0.0f)

设置 Window 布局相关参数

Parameters

window
gravity

Dialog的对齐方式

widthRatio

宽度比例,根据屏幕宽度计算得来

x

x轴偏移量,需与 gravity 结合使用

y

y轴偏移量,需与 gravity 结合使用

horizontalMargin

水平方向边距

verticalMargin

垂直方向边距

horizontalWeight

水平方向权重

verticalWeight

垂直方向权重