setWindow

open override fun setWindow(window: Window?, gravity: Int, widthRatio: Float, x: Int, y: Int, horizontalMargin: Float, verticalMargin: Float, horizontalWeight: Float, verticalWeight: Float)

设置 Window 布局相关参数

Parameters

window
gravity

Dialog的对齐方式

widthRatio

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

x

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

y

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

horizontalMargin

水平方向边距

verticalMargin

垂直方向边距

horizontalWeight

水平方向权重

verticalWeight

垂直方向权重