Commit ae0d5536 authored by zhaopengxiang's avatar zhaopengxiang

密码校验弹窗逻辑调整

parent fed32d8a
......@@ -43,6 +43,8 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
viewBinding.tvError.visibility = View.GONE
}
}
viewBinding.tvConfirm.alpha = 0.5f
viewBinding.tvConfirm.isEnabled = false
return viewBinding.root
}
......@@ -55,7 +57,7 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
window.setGravity(Gravity.BOTTOM)
window.setLayout(
WindowManager.LayoutParams.MATCH_PARENT,
context?.let { dp2px(it,637f) }!!
context?.let { dp2px(it, 637f) }!!
)
showView()
}
......@@ -85,7 +87,7 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
AccountPasswordManageKit.getInstance()
.loadAccountPassword(context as AppCompatActivity?,
AccountPasswordManageKit.AccountPasswordManageCallback {
checkPasswordAndDoNext(it,inputPassword)
checkPasswordAndDoNext(it, inputPassword)
})
} else {
checkPasswordAndDoNext(accountPassword, inputPassword)
......@@ -105,6 +107,15 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
this.addTextChangedListener(object : TextWatcher {
override fun afterTextChanged(editable: Editable?) {
afterTextChanged.invoke(editable.toString())
val password = viewBinding.etPassword.text.toString()
if (TextUtils.isEmpty(password)) {
viewBinding.tvConfirm.alpha = 0.5f
viewBinding.tvConfirm.isEnabled = false
} else {
viewBinding.tvConfirm.alpha = 1.0f
viewBinding.tvConfirm.isEnabled = true
}
}
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
......
......@@ -21,7 +21,7 @@
<string name="cancel">取消</string>
<string name="sure">确定</string>
<string name="search_order_prompt_text">还没有明细哦~</string>
<string name="app_text_login_out">是否确认退出登录账号</string>
<string name="app_text_login_out">是否确认退出账号</string>
<string name="text_login_out_sure">确认退出</string>
<string name="app_login_out">退出登录</string>
<string name="text_refund_amount">退款金额¥%s,是否确认退款</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment