CustomerCardSendRemindDialog.kt 1.08 KB
Newer Older
konghaorui committed
1 2 3 4 5 6 7
package com.yidianling.im.dialog

import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.WindowManager
import com.yidianling.im.R
konghaorui committed
8
import kotlinx.android.synthetic.main.im_customer_card_send_remind_dialog.*
konghaorui committed
9 10 11 12 13 14 15 16 17

/**
 * Created by xj on 2019/10/29.
 */
class CustomerCardSendRemindDialog(val mContext: Context, val listener: CustomerCardSendDialogListener): Dialog(mContext, R.style.dialog_default_style) {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

konghaorui committed
18
        setContentView(R.layout.im_customer_card_send_remind_dialog)
konghaorui committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

        val params = window.attributes
        params.width = WindowManager.LayoutParams.MATCH_PARENT
        params.height = WindowManager.LayoutParams.MATCH_PARENT
        window.attributes = params

        customer_card_send_dialog_cancel.setOnClickListener { dismiss() }

        customer_card_send_dialog_sure.setOnClickListener {
            listener?.sureClick()
            dismiss()
        }


    }

    interface CustomerCardSendDialogListener{
        fun sureClick()
    }

}