Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
3efd3177
Commit
3efd3177
authored
Jun 23, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 生活号名称修改页面输入内容为空时不允许保存
parent
253eb128
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
LifeAccountModifyNameActivity.kt
...an/newscontent/ui/center/LifeAccountModifyNameActivity.kt
+4
-2
CommonTopBarView.kt
...idian/shenghuoquan/newscontent/widget/CommonTopBarView.kt
+8
-0
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/center/LifeAccountModifyNameActivity.kt
View file @
3efd3177
...
@@ -50,6 +50,8 @@ class LifeAccountModifyNameActivity : BaseActivity<ActivityLifeAccountModifyName
...
@@ -50,6 +50,8 @@ class LifeAccountModifyNameActivity : BaseActivity<ActivityLifeAccountModifyName
}
}
private
fun
initView
()
{
private
fun
initView
()
{
// 默认保存按钮不可用
viewBind
.
bvTopBar
.
setActionEnable
(
false
)
// 生活号名称长度限制24个字符
// 生活号名称长度限制24个字符
viewBind
.
evLifeAccountName
.
setInputFilters
(
InputFilterUtil
.
getLengthFilter
(
Constant
.
MAX_LENGTH_LIFE_ACCOUNT_NAME
,
this
))
viewBind
.
evLifeAccountName
.
setInputFilters
(
InputFilterUtil
.
getLengthFilter
(
Constant
.
MAX_LENGTH_LIFE_ACCOUNT_NAME
,
this
))
}
}
...
@@ -83,11 +85,11 @@ class LifeAccountModifyNameActivity : BaseActivity<ActivityLifeAccountModifyName
...
@@ -83,11 +85,11 @@ class LifeAccountModifyNameActivity : BaseActivity<ActivityLifeAccountModifyName
}
}
override
fun
onTextClear
(
from
:
LifeAccountAuthIdentityInfoEditView
)
{
override
fun
onTextClear
(
from
:
LifeAccountAuthIdentityInfoEditView
)
{
viewBind
.
bvTopBar
.
setActionEnable
(
false
)
}
}
override
fun
onTextChange
(
from
:
LifeAccountAuthIdentityInfoEditView
,
text
:
String
)
{
override
fun
onTextChange
(
from
:
LifeAccountAuthIdentityInfoEditView
,
text
:
String
)
{
viewBind
.
bvTopBar
.
setActionEnable
(
true
)
}
}
override
fun
createLifeAccountCallback
(
result
:
Boolean
)
{
override
fun
createLifeAccountCallback
(
result
:
Boolean
)
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/CommonTopBarView.kt
View file @
3efd3177
...
@@ -68,6 +68,14 @@ class CommonTopBarView @JvmOverloads constructor(
...
@@ -68,6 +68,14 @@ class CommonTopBarView @JvmOverloads constructor(
viewBinding
.
tvAction
.
isVisible
=
isVisible
viewBinding
.
tvAction
.
isVisible
=
isVisible
}
}
/**
* 设置操作按钮是否可用
*/
fun
setActionEnable
(
isEnable
:
Boolean
)
{
viewBinding
.
tvAction
.
isEnabled
=
isEnable
viewBinding
.
tvAction
.
alpha
=
if
(
isEnable
)
1f
else
0.4f
}
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
if
(
v
?.
id
==
R
.
id
.
iv_back
)
{
if
(
v
?.
id
==
R
.
id
.
iv_back
)
{
// 若没有设置返回点击回调则默认pop
// 若没有设置返回点击回调则默认pop
...
...
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