/verifIcationCode-master

自定义验证码/密码输入弹窗

Primary LanguageKotlin

#自定义弹窗验证码+自定义输入键盘

//第三方依赖
allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }

    dependencies {
           	        implementation 'com.github.1432886945:verifIcationCode-master:v1.0.0

    }

image

     //初始化
     payDialog = PayDialog(this)

    //初始化事件
     payDialog.setPasswordListener(object : PayDialog.PasswordListener {
                //自定义按钮点击事件
                override fun forgetPwdClick() {
                    Toast.makeText(this@MainActivity,"点我干嘛!!,搞事情",Toast.LENGTH_LONG).show()
                }
                //输入完成事件
                override fun fullPwd(content: String) {
                    Toast.makeText(this@MainActivity,"输入完成",Toast.LENGTH_LONG).show()
                    payDialog.dismiss()
                }
            })

    //显示
    show!!.setOnClickListener({
                if (payDialog.isShowing) payDialog.dismiss()
                //显示纯数字
                payDialog.setIsPass(false)
                payDialog.show()
            })
            show1!!.setOnClickListener({
                if (payDialog.isShowing) payDialog.dismiss()
                //显示加密数据
                payDialog.setIsPass(true)
                payDialog.show()
            })