打开app不再清除本地数据,不再发送数据到结算终端,改为新增人脸采集接口,全量增量接口优化
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package com.sw.platecabinet.dialog
|
||||
|
||||
import android.app.Dialog
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.os.Bundle
|
||||
import android.view.Window
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.sw.platecabinet.databinding.DialogCustomBinding
|
||||
import com.sw.platecabinet.databinding.DialogUserBindRemindBinding
|
||||
import com.sw.platecabinet.ext.dp
|
||||
|
||||
open class CustomDialog(
|
||||
var activity: FragmentActivity,
|
||||
var content: String,
|
||||
var onCancel: () -> Unit = {},
|
||||
var onConfirm: () -> Unit = {},
|
||||
) : Dialog(activity) {
|
||||
|
||||
private lateinit var binding: DialogCustomBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE)
|
||||
binding = DialogCustomBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
window?.run {
|
||||
attributes = attributes.apply {
|
||||
width = 480.dp
|
||||
}
|
||||
setBackgroundDrawable(ColorDrawable())
|
||||
setCancelable(false)
|
||||
}
|
||||
binding.tvContent.text = content
|
||||
addClickListener()
|
||||
}
|
||||
|
||||
private fun addClickListener() {
|
||||
binding.btnCancel.setOnClickListener {
|
||||
onCancel()
|
||||
dismiss()
|
||||
}
|
||||
binding.btnConfirm.setOnClickListener {
|
||||
onConfirm()
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user