Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MiYaFastCashier
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
MiYaFastCashier
Commits
ae0d5536
Commit
ae0d5536
authored
Apr 06, 2022
by
zhaopengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
密码校验弹窗逻辑调整
parent
fed32d8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
AuthorizePasswordInputDialog.kt
...iya/fastcashier/ui/dialog/AuthorizePasswordInputDialog.kt
+13
-2
strings.xml
app/src/main/res/values/strings.xml
+1
-1
No files found.
app/src/main/java/com/miya/fastcashier/ui/dialog/AuthorizePasswordInputDialog.kt
View file @
ae0d5536
...
@@ -43,6 +43,8 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
...
@@ -43,6 +43,8 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
viewBinding
.
tvError
.
visibility
=
View
.
GONE
viewBinding
.
tvError
.
visibility
=
View
.
GONE
}
}
}
}
viewBinding
.
tvConfirm
.
alpha
=
0.5f
viewBinding
.
tvConfirm
.
isEnabled
=
false
return
viewBinding
.
root
return
viewBinding
.
root
}
}
...
@@ -55,7 +57,7 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
...
@@ -55,7 +57,7 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
window
.
setGravity
(
Gravity
.
BOTTOM
)
window
.
setGravity
(
Gravity
.
BOTTOM
)
window
.
setLayout
(
window
.
setLayout
(
WindowManager
.
LayoutParams
.
MATCH_PARENT
,
WindowManager
.
LayoutParams
.
MATCH_PARENT
,
context
?.
let
{
dp2px
(
it
,
637f
)
}
!!
context
?.
let
{
dp2px
(
it
,
637f
)
}
!!
)
)
showView
()
showView
()
}
}
...
@@ -85,7 +87,7 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
...
@@ -85,7 +87,7 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
AccountPasswordManageKit
.
getInstance
()
AccountPasswordManageKit
.
getInstance
()
.
loadAccountPassword
(
context
as
AppCompatActivity
?,
.
loadAccountPassword
(
context
as
AppCompatActivity
?,
AccountPasswordManageKit
.
AccountPasswordManageCallback
{
AccountPasswordManageKit
.
AccountPasswordManageCallback
{
checkPasswordAndDoNext
(
it
,
inputPassword
)
checkPasswordAndDoNext
(
it
,
inputPassword
)
})
})
}
else
{
}
else
{
checkPasswordAndDoNext
(
accountPassword
,
inputPassword
)
checkPasswordAndDoNext
(
accountPassword
,
inputPassword
)
...
@@ -105,6 +107,15 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
...
@@ -105,6 +107,15 @@ class AuthorizePasswordInputDialog() : DialogFragment(), View.OnClickListener {
this
.
addTextChangedListener
(
object
:
TextWatcher
{
this
.
addTextChangedListener
(
object
:
TextWatcher
{
override
fun
afterTextChanged
(
editable
:
Editable
?)
{
override
fun
afterTextChanged
(
editable
:
Editable
?)
{
afterTextChanged
.
invoke
(
editable
.
toString
())
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
)
{}
override
fun
beforeTextChanged
(
s
:
CharSequence
,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{}
...
...
app/src/main/res/values/strings.xml
View file @
ae0d5536
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<string
name=
"cancel"
>
取消
</string>
<string
name=
"cancel"
>
取消
</string>
<string
name=
"sure"
>
确定
</string>
<string
name=
"sure"
>
确定
</string>
<string
name=
"search_order_prompt_text"
>
还没有明细哦~
</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=
"text_login_out_sure"
>
确认退出
</string>
<string
name=
"app_login_out"
>
退出登录
</string>
<string
name=
"app_login_out"
>
退出登录
</string>
<string
name=
"text_refund_amount"
>
退款金额¥%s,是否确认退款
</string>
<string
name=
"text_refund_amount"
>
退款金额¥%s,是否确认退款
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment