Skip to content

VBDialog

William edited this page Sep 11, 2024 · 5 revisions
class ***(mContext:Context): VBDialog<***Binding>(mContext) {
    /**
     * 设置dialog弹出方向 [VBDialogOrientation]
     */
    open fun useDirection(): VBDialogOrientation = VBDialogOrientation.CENTRE

    /**
     * 是否变暗
     */
    open fun useDim(): Boolean {
        return true
    }

    /**
     * 变暗系数 系数0.0-1.0 系数越高暗度越高
     */
    open fun useDimAmount(): Float {
        return VBConfig.options.dialogDimAmount
    }

    /**
     * 是否开启弹出动画
     */
    open fun useAnimations(): Boolean {
        return true
    }

    /**
     * 自定义弹出动画
     */
    open fun useAnimationsRes(): Int {
        return 0
    }

    /**
     * dialog是否全屏(单独使用此方法不会生效,需先把activity的状态栏给隐藏)
     */
    open fun useFullScreen(): Boolean {
        return false
    }
}
Clone this wiki locally