lmw
2025-01-10 601f14db94013373df700e007095f7f2f5ecbe24
app/src/main/java/com/sinata/xqmuse/dialog/BaseDialogFragment.kt
@@ -20,6 +20,7 @@
    abstract fun setContentView(): Int
    abstract fun setGravity(): Int
    abstract fun initView()
    open fun heightMatch() = false
    var isFirstResume = true
    var canceledOnTouchOutside = true
@@ -44,7 +45,7 @@
    override fun onActivityCreated(savedInstanceState: Bundle?) {
        super.onActivityCreated(savedInstanceState)
        dialog?.window?.setLayout(matchParent, wrapContent)
        dialog?.window?.setLayout(matchParent, if (heightMatch()) matchParent else wrapContent)
        dialog?.window?.setGravity(setGravity())
        dialog?.setCanceledOnTouchOutside(canceledOnTouchOutside)
        isCancelable = mCancelable