欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Android积木之Dialog

程序员文章站 2024-02-11 11:41:10
...
constructor(context: Context?) : super(context, R.style.QMUI_BottomSheet) {
            window!!.decorView.setPadding(0, 0, 0, 0)
            val params = window!!.attributes
            params.height = ViewGroup.LayoutParams.MATCH_PARENT
            params.width = ViewGroup.LayoutParams.MATCH_PARENT
            params.gravity = Gravity.CENTER
            window!!.attributes = params
            setCanceledOnTouchOutside(true)
            var popupView = LayoutInflater.from(context).inflate(R.layout.pop_finance_close, null)
            setContentView(popupView)
}