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
684d0bbf
Commit
684d0bbf
authored
Jun 28, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix UI走查 身份信息、营业执照信息表单样式
parent
7d3aa55f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
211 additions
and
170 deletions
+211
-170
LifeAccountBusinessLicenseAuthFragment.kt
...content/ui/auth/LifeAccountBusinessLicenseAuthFragment.kt
+3
-0
LifeAccountAuthBusinessInfoEditView.kt
...newscontent/widget/LifeAccountAuthBusinessInfoEditView.kt
+17
-5
LifeAccountAuthIdentityInfoEditView.kt
...newscontent/widget/LifeAccountAuthIdentityInfoEditView.kt
+175
-164
shape_bg_input_cursor.xml
...wscontent/src/main/res/drawable/shape_bg_input_cursor.xml
+11
-0
view_life_account_auth_business_info_edit.xml
.../res/layout/view_life_account_auth_business_info_edit.xml
+2
-0
view_life_account_auth_identity_info_edit.xml
.../res/layout/view_life_account_auth_identity_info_edit.xml
+3
-1
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/auth/LifeAccountBusinessLicenseAuthFragment.kt
View file @
684d0bbf
...
@@ -12,6 +12,7 @@ import android.util.Log
...
@@ -12,6 +12,7 @@ import android.util.Log
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
androidx.core.content.ContextCompat
import
androidx.core.content.FileProvider
import
androidx.core.content.FileProvider
import
androidx.core.view.isVisible
import
androidx.core.view.isVisible
import
com.bumptech.glide.Glide
import
com.bumptech.glide.Glide
...
@@ -254,6 +255,7 @@ class LifeAccountBusinessLicenseAuthFragment :
...
@@ -254,6 +255,7 @@ class LifeAccountBusinessLicenseAuthFragment :
viewBinding
.
ivBusinessLicense
.
setImageDrawable
(
null
)
viewBinding
.
ivBusinessLicense
.
setImageDrawable
(
null
)
// 清除错误提示
// 清除错误提示
viewBinding
.
tvUploadErrorTips
.
isVisible
=
false
viewBinding
.
tvUploadErrorTips
.
isVisible
=
false
activity
?.
let
{
viewBinding
.
viewBusinessLicenseUploadDivider
.
setBackgroundColor
(
ContextCompat
.
getColor
(
it
,
R
.
color
.
color_FFF2F2F2
))
}
viewBinding
.
ivClear
.
isVisible
=
false
viewBinding
.
ivClear
.
isVisible
=
false
// 清除OCR或用户输入内容
// 清除OCR或用户输入内容
viewBinding
.
evRegistrationName
.
clearEditContent
()
viewBinding
.
evRegistrationName
.
clearEditContent
()
...
@@ -310,6 +312,7 @@ class LifeAccountBusinessLicenseAuthFragment :
...
@@ -310,6 +312,7 @@ class LifeAccountBusinessLicenseAuthFragment :
viewBinding
.
tvUploadErrorTips
.
isVisible
=
true
viewBinding
.
tvUploadErrorTips
.
isVisible
=
true
viewBinding
.
tvUploadErrorTips
.
text
=
viewBinding
.
tvUploadErrorTips
.
text
=
resources
.
getString
(
R
.
string
.
check_business_license_distinct
)
resources
.
getString
(
R
.
string
.
check_business_license_distinct
)
activity
?.
let
{
viewBinding
.
viewBusinessLicenseUploadDivider
.
setBackgroundColor
(
ContextCompat
.
getColor
(
it
,
R
.
color
.
color_FFFF3A3A
))
}
}
}
override
fun
onTextClear
(
from
:
LifeAccountAuthBusinessInfoEditView
)
{
override
fun
onTextClear
(
from
:
LifeAccountAuthBusinessInfoEditView
)
{
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountAuthBusinessInfoEditView.kt
View file @
684d0bbf
...
@@ -8,6 +8,7 @@ import android.text.TextUtils
...
@@ -8,6 +8,7 @@ import android.text.TextUtils
import
android.text.TextWatcher
import
android.text.TextWatcher
import
android.util.AttributeSet
import
android.util.AttributeSet
import
android.view.View
import
android.view.View
import
androidx.core.content.ContextCompat
import
androidx.core.view.isVisible
import
androidx.core.view.isVisible
import
com.yidian.nightmode.widget.YdConstraintLayout
import
com.yidian.nightmode.widget.YdConstraintLayout
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.R
...
@@ -22,7 +23,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
...
@@ -22,7 +23,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
context
:
Context
,
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
attrs
:
AttributeSet
?
=
null
,
defStyle
:
Int
=
0
defStyle
:
Int
=
0
)
:
YdConstraintLayout
(
context
,
attrs
,
defStyle
),
View
.
OnClickListener
,
TextWatcher
{
)
:
YdConstraintLayout
(
context
,
attrs
,
defStyle
),
View
.
OnClickListener
,
TextWatcher
,
View
.
OnFocusChangeListener
{
private
val
viewBinding
:
ViewLifeAccountAuthBusinessInfoEditBinding
=
private
val
viewBinding
:
ViewLifeAccountAuthBusinessInfoEditBinding
=
ViewLifeAccountAuthBusinessInfoEditBinding
.
bind
(
ViewLifeAccountAuthBusinessInfoEditBinding
.
bind
(
...
@@ -50,6 +51,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
...
@@ -50,6 +51,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
typedArray
.
recycle
()
typedArray
.
recycle
()
viewBinding
.
ivClear
.
setOnClickListener
(
this
)
viewBinding
.
ivClear
.
setOnClickListener
(
this
)
viewBinding
.
etContent
.
addTextChangedListener
(
this
)
viewBinding
.
etContent
.
addTextChangedListener
(
this
)
viewBinding
.
etContent
.
onFocusChangeListener
=
this
}
}
/**
/**
...
@@ -58,6 +60,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
...
@@ -58,6 +60,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
fun
showErrorTips
(
tips
:
String
)
{
fun
showErrorTips
(
tips
:
String
)
{
viewBinding
.
tvErrorTips
.
isVisible
=
true
viewBinding
.
tvErrorTips
.
isVisible
=
true
viewBinding
.
tvErrorTips
.
text
=
tips
viewBinding
.
tvErrorTips
.
text
=
tips
viewBinding
.
viewDivider
.
setBackgroundColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFFF3A3A
))
highLightEditContent
()
highLightEditContent
()
}
}
...
@@ -67,6 +70,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
...
@@ -67,6 +70,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
private
fun
dismissErrorTips
()
{
private
fun
dismissErrorTips
()
{
viewBinding
.
tvErrorTips
.
isVisible
=
false
viewBinding
.
tvErrorTips
.
isVisible
=
false
viewBinding
.
tvErrorTips
.
text
=
""
viewBinding
.
tvErrorTips
.
text
=
""
viewBinding
.
viewDivider
.
setBackgroundColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_333333
))
cancelHighLightEditContent
()
cancelHighLightEditContent
()
}
}
...
@@ -77,7 +81,6 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
...
@@ -77,7 +81,6 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
viewBinding
.
etContent
.
setText
(
""
)
viewBinding
.
etContent
.
setText
(
""
)
if
(
isInputError
)
{
if
(
isInputError
)
{
dismissErrorTips
()
dismissErrorTips
()
cancelHighLightEditContent
()
}
}
callback
?.
onTextClear
(
this
)
callback
?.
onTextClear
(
this
)
}
}
...
@@ -105,7 +108,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
...
@@ -105,7 +108,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
*/
*/
fun
highLightEditContent
()
{
fun
highLightEditContent
()
{
isInputError
=
true
isInputError
=
true
viewBinding
.
etContent
.
setTextColor
(
Co
lor
.
parseColor
(
"#FFFF3A3A"
))
viewBinding
.
etContent
.
setTextColor
(
Co
ntextCompat
.
getColor
(
context
,
R
.
color
.
color_FFFF3A3A
))
}
}
/**
/**
...
@@ -113,7 +116,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
...
@@ -113,7 +116,7 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
*/
*/
private
fun
cancelHighLightEditContent
()
{
private
fun
cancelHighLightEditContent
()
{
isInputError
=
false
isInputError
=
false
viewBinding
.
etContent
.
setTextColor
(
Co
lor
.
parseColor
(
"#FF333333"
))
viewBinding
.
etContent
.
setTextColor
(
Co
ntextCompat
.
getColor
(
context
,
R
.
color
.
color_333333
))
}
}
/**
/**
...
@@ -144,7 +147,16 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
...
@@ -144,7 +147,16 @@ class LifeAccountAuthBusinessInfoEditView @JvmOverloads constructor(
callback
?.
onTextChange
(
this
,
s
.
toString
())
callback
?.
onTextChange
(
this
,
s
.
toString
())
if
(
isInputError
)
{
if
(
isInputError
)
{
dismissErrorTips
()
dismissErrorTips
()
cancelHighLightEditContent
()
}
}
override
fun
onFocusChange
(
v
:
View
?,
hasFocus
:
Boolean
)
{
if
(
hasFocus
)
{
// 获得焦点
viewBinding
.
viewDivider
.
setBackgroundColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_333333
))
}
else
{
// 失去焦点
viewBinding
.
viewDivider
.
setBackgroundColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFF2F2F2
))
}
}
}
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/widget/LifeAccountAuthIdentityInfoEditView.kt
View file @
684d0bbf
package
com.yidian.shenghuoquan.newscontent.widget
package
com.yidian.shenghuoquan.newscontent.widget
import
android.content.Context
import
android.content.Context
import
android.graphics.Color
import
android.text.Editable
import
android.text.Editable
import
android.text.InputFilter
import
android.text.InputFilter
import
android.text.TextUtils
import
android.text.TextUtils
import
android.text.TextWatcher
import
android.text.TextWatcher
import
android.util.AttributeSet
import
android.util.AttributeSet
import
android.view.View
import
android.view.View
import
androidx.core.content.ContextCompat
import
com.yidian.nightmode.widget.YdConstraintLayout
import
com.yidian.nightmode.widget.YdConstraintLayout
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.R
import
com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountAuthIdentityInfoEditBinding
import
com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountAuthIdentityInfoEditBinding
...
@@ -18,171 +18,182 @@ import com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountAuthIdenti
...
@@ -18,171 +18,182 @@ import com.yidian.shenghuoquan.newscontent.databinding.ViewLifeAccountAuthIdenti
* description: 生活号认证 身份证信息录入
* description: 生活号认证 身份证信息录入
*/
*/
class
LifeAccountAuthIdentityInfoEditView
@JvmOverloads
constructor
(
class
LifeAccountAuthIdentityInfoEditView
@JvmOverloads
constructor
(
context
:
Context
,
context
:
Context
,
attrs
:
AttributeSet
?
=
null
,
attrs
:
AttributeSet
?
=
null
,
defStyle
:
Int
=
0
defStyle
:
Int
=
0
)
:
YdConstraintLayout
(
context
,
attrs
,
defStyle
),
View
.
OnClickListener
,
TextWatcher
{
)
:
YdConstraintLayout
(
context
,
attrs
,
defStyle
),
View
.
OnClickListener
,
TextWatcher
,
View
.
OnFocusChangeListener
{
private
val
viewBinding
:
ViewLifeAccountAuthIdentityInfoEditBinding
=
private
val
viewBinding
:
ViewLifeAccountAuthIdentityInfoEditBinding
=
ViewLifeAccountAuthIdentityInfoEditBinding
.
bind
(
ViewLifeAccountAuthIdentityInfoEditBinding
.
bind
(
View
.
inflate
(
View
.
inflate
(
getContext
(),
getContext
(),
R
.
layout
.
view_life_account_auth_identity_info_edit
,
R
.
layout
.
view_life_account_auth_identity_info_edit
,
this
this
)
)
)
)
private
var
callback
:
OnLifeAccountAuthIdentityInfoEditViewCallback
?
=
null
private
var
callback
:
OnLifeAccountAuthIdentityInfoEditViewCallback
?
=
null
/**
/**
* 是否输入错误标识位
* 是否输入错误标识位
*/
*/
private
var
isInputError
=
false
private
var
isInputError
=
false
init
{
init
{
val
typedArray
=
val
typedArray
=
context
.
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
LifeAccountAuthIdentityInfoEditView
)
context
.
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
LifeAccountAuthIdentityInfoEditView
)
viewBinding
.
tvContent
.
text
=
viewBinding
.
tvContent
.
text
=
typedArray
.
getText
(
R
.
styleable
.
LifeAccountAuthIdentityInfoEditView_LifeAccountAuthIdentityInfoEditView_content_text
)
typedArray
.
getText
(
R
.
styleable
.
LifeAccountAuthIdentityInfoEditView_LifeAccountAuthIdentityInfoEditView_content_text
)
viewBinding
.
etContent
.
hint
=
viewBinding
.
etContent
.
hint
=
typedArray
.
getText
(
R
.
styleable
.
LifeAccountAuthIdentityInfoEditView_LifeAccountAuthIdentityInfoEditView_hint_text
)
typedArray
.
getText
(
R
.
styleable
.
LifeAccountAuthIdentityInfoEditView_LifeAccountAuthIdentityInfoEditView_hint_text
)
typedArray
.
recycle
()
typedArray
.
recycle
()
viewBinding
.
ivClear
.
setOnClickListener
(
this
)
viewBinding
.
ivClear
.
setOnClickListener
(
this
)
viewBinding
.
etContent
.
addTextChangedListener
(
this
)
viewBinding
.
etContent
.
addTextChangedListener
(
this
)
}
viewBinding
.
etContent
.
onFocusChangeListener
=
this
}
/**
* 设置标题
/**
*/
* 设置标题
fun
setTitleContent
(
content
:
String
)
{
*/
viewBinding
.
tvContent
.
text
=
content
fun
setTitleContent
(
content
:
String
)
{
}
viewBinding
.
tvContent
.
text
=
content
}
/**
* 展示错误提示
/**
*/
* 展示错误提示
fun
showErrorTips
(
tips
:
String
)
{
*/
viewBinding
.
tvErrorTips
.
visibility
=
View
.
VISIBLE
fun
showErrorTips
(
tips
:
String
)
{
viewBinding
.
tvErrorTips
.
text
=
tips
viewBinding
.
tvErrorTips
.
visibility
=
View
.
VISIBLE
highLightEditContent
()
viewBinding
.
tvErrorTips
.
text
=
tips
}
viewBinding
.
viewDivider
.
setBackgroundColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFFF3A3A
))
highLightEditContent
()
/**
}
* 隐藏错误提示
*/
/**
private
fun
dismissErrorTips
()
{
* 隐藏错误提示
viewBinding
.
tvErrorTips
.
visibility
=
View
.
GONE
*/
viewBinding
.
tvErrorTips
.
text
=
""
private
fun
dismissErrorTips
()
{
cancelHighLightEditContent
()
viewBinding
.
tvErrorTips
.
visibility
=
View
.
GONE
}
viewBinding
.
tvErrorTips
.
text
=
""
viewBinding
.
viewDivider
.
setBackgroundColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_333333
))
/**
cancelHighLightEditContent
()
* 清除输入的文字
}
*/
fun
clearEditContent
()
{
/**
viewBinding
.
etContent
.
setText
(
""
)
* 清除输入的文字
if
(
isInputError
)
{
*/
dismissErrorTips
()
fun
clearEditContent
()
{
cancelHighLightEditContent
()
viewBinding
.
etContent
.
setText
(
""
)
}
if
(
isInputError
)
{
callback
?.
onTextClear
(
this
)
dismissErrorTips
()
}
}
callback
?.
onTextClear
(
this
)
/**
}
* 填充传入的文字
*/
/**
fun
fillEditContent
(
content
:
String
?)
{
* 填充传入的文字
if
(!
TextUtils
.
isEmpty
(
content
))
{
*/
viewBinding
.
etContent
.
setText
(
content
)
fun
fillEditContent
(
content
:
String
?)
{
viewBinding
.
ivClear
.
visibility
=
View
.
VISIBLE
if
(!
TextUtils
.
isEmpty
(
content
))
{
}
viewBinding
.
etContent
.
setText
(
content
)
}
viewBinding
.
ivClear
.
visibility
=
View
.
VISIBLE
}
/**
}
* 禁止修改
*/
/**
fun
disableModify
()
{
* 禁止修改
viewBinding
.
ivClear
.
visibility
=
View
.
GONE
*/
viewBinding
.
etContent
.
keyListener
=
null
fun
disableModify
()
{
}
viewBinding
.
ivClear
.
visibility
=
View
.
GONE
viewBinding
.
etContent
.
keyListener
=
null
}
/**
* 高亮显示输入文本
*/
fun
highLightEditContent
()
{
isInputError
=
true
viewBinding
.
etContent
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFFF3A3A
))
}
/**
* 取消高亮显示输入文本
*/
fun
cancelHighLightEditContent
()
{
isInputError
=
false
viewBinding
.
etContent
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_333333
))
}
/**
* 输入框获取焦点
*/
fun
requestEditTextFocus
()
{
viewBinding
.
etContent
.
isFocusable
=
true
viewBinding
.
etContent
.
isFocusableInTouchMode
=
true
viewBinding
.
etContent
.
requestFocus
()
}
/**
* 获取当前输入的内容
*/
fun
getEditContent
():
String
{
return
viewBinding
.
etContent
.
text
.
toString
()
}
/**
* 设置输入过滤
*/
fun
setInputFilters
(
vararg
filter
:
InputFilter
)
{
viewBinding
.
etContent
.
filters
=
filter
}
override
fun
onClick
(
v
:
View
?)
{
if
(
v
?.
id
==
R
.
id
.
iv_clear
)
{
// 清除输入框中的内容
clearEditContent
()
}
}
override
fun
beforeTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{
}
override
fun
onTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
before
:
Int
,
count
:
Int
)
{
}
override
fun
afterTextChanged
(
s
:
Editable
?)
{
// 处理一键清除按钮
viewBinding
.
ivClear
.
visibility
=
if
(
TextUtils
.
isEmpty
(
s
))
View
.
GONE
else
View
.
VISIBLE
callback
?.
onTextChange
(
this
,
s
.
toString
())
if
(
isInputError
)
{
dismissErrorTips
()
}
}
override
fun
onFocusChange
(
v
:
View
?,
hasFocus
:
Boolean
)
{
if
(
hasFocus
)
{
// 获得焦点
viewBinding
.
viewDivider
.
setBackgroundColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_333333
))
}
else
{
// 失去焦点
viewBinding
.
viewDivider
.
setBackgroundColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
color_FFF2F2F2
))
}
}
fun
setOnLifeAccountAuthIdentityInfoEditViewCallback
(
callback
:
OnLifeAccountAuthIdentityInfoEditViewCallback
)
{
this
.
callback
=
callback
}
interface
OnLifeAccountAuthIdentityInfoEditViewCallback
{
/**
/**
*
高亮显示输入文本
*
清除内容
*/
*/
fun
highLightEditContent
()
{
fun
onTextClear
(
from
:
LifeAccountAuthIdentityInfoEditView
)
isInputError
=
true
viewBinding
.
etContent
.
setTextColor
(
Color
.
parseColor
(
"#FFFF3A3A"
))
}
/**
* 取消高亮显示输入文本
*/
fun
cancelHighLightEditContent
()
{
isInputError
=
false
viewBinding
.
etContent
.
setTextColor
(
Color
.
parseColor
(
"#FF333333"
))
}
/**
/**
*
输入框获取焦点
*
内容修改
*/
*/
fun
requestEditTextFocus
()
{
fun
onTextChange
(
from
:
LifeAccountAuthIdentityInfoEditView
,
text
:
String
)
viewBinding
.
etContent
.
isFocusable
=
true
}
viewBinding
.
etContent
.
isFocusableInTouchMode
=
true
}
viewBinding
.
etContent
.
requestFocus
()
}
/**
* 获取当前输入的内容
*/
fun
getEditContent
():
String
{
return
viewBinding
.
etContent
.
text
.
toString
()
}
/**
* 设置输入过滤
*/
fun
setInputFilters
(
vararg
filter
:
InputFilter
)
{
viewBinding
.
etContent
.
filters
=
filter
}
override
fun
onClick
(
v
:
View
?)
{
if
(
v
?.
id
==
R
.
id
.
iv_clear
)
{
// 清除输入框中的内容
clearEditContent
()
}
}
override
fun
beforeTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{
}
override
fun
onTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
before
:
Int
,
count
:
Int
)
{
}
override
fun
afterTextChanged
(
s
:
Editable
?)
{
// 处理一键清除按钮
viewBinding
.
ivClear
.
visibility
=
if
(
TextUtils
.
isEmpty
(
s
))
View
.
GONE
else
View
.
VISIBLE
callback
?.
onTextChange
(
this
,
s
.
toString
())
if
(
isInputError
)
{
dismissErrorTips
()
cancelHighLightEditContent
()
}
}
fun
setOnLifeAccountAuthIdentityInfoEditViewCallback
(
callback
:
OnLifeAccountAuthIdentityInfoEditViewCallback
)
{
this
.
callback
=
callback
}
interface
OnLifeAccountAuthIdentityInfoEditViewCallback
{
/**
* 清除内容
*/
fun
onTextClear
(
from
:
LifeAccountAuthIdentityInfoEditView
)
/**
* 内容修改
*/
fun
onTextChange
(
from
:
LifeAccountAuthIdentityInfoEditView
,
text
:
String
)
}
}
\ No newline at end of file
Components/newscontent/src/main/res/drawable/shape_bg_input_cursor.xml
0 → 100644
View file @
684d0bbf
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/color_FF1852F1"
/>
<size
android:width=
"@dimen/dp2"
android:height=
"@dimen/dp19"
/>
</shape>
\ No newline at end of file
Components/newscontent/src/main/res/layout/view_life_account_auth_business_info_edit.xml
View file @
684d0bbf
...
@@ -24,7 +24,9 @@
...
@@ -24,7 +24,9 @@
android:includeFontPadding=
"false"
android:includeFontPadding=
"false"
android:textColor=
"#FF333333"
android:textColor=
"#FF333333"
android:textColorHint=
"#FFC2C2C2"
android:textColorHint=
"#FFC2C2C2"
android:textCursorDrawable=
"@drawable/shape_bg_input_cursor"
android:textSize=
"15sp"
android:textSize=
"15sp"
android:textStyle=
"bold"
app:layout_constraintTop_toBottomOf=
"@id/tv_content"
/>
app:layout_constraintTop_toBottomOf=
"@id/tv_content"
/>
<com.yidian.nightmode.widget.YdImageView
<com.yidian.nightmode.widget.YdImageView
...
...
Components/newscontent/src/main/res/layout/view_life_account_auth_identity_info_edit.xml
View file @
684d0bbf
...
@@ -28,9 +28,11 @@
...
@@ -28,9 +28,11 @@
android:singleLine=
"true"
android:singleLine=
"true"
android:textColor=
"#FF333333"
android:textColor=
"#FF333333"
android:textColorHint=
"#FFC2C2C2"
android:textColorHint=
"#FFC2C2C2"
android:textCursorDrawable=
"@drawable/shape_bg_input_cursor"
android:textSize=
"15sp"
android:textSize=
"15sp"
a
pp:layout_constraintStart_toEndOf=
"@id/tv_content
"
a
ndroid:textStyle=
"bold
"
app:layout_constraintEnd_toStartOf=
"@id/iv_clear"
app:layout_constraintEnd_toStartOf=
"@id/iv_clear"
app:layout_constraintStart_toEndOf=
"@id/tv_content"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
<com.yidian.nightmode.widget.YdImageView
<com.yidian.nightmode.widget.YdImageView
...
...
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