Commit da541843 by 刘鹏

feat : 隐藏身份证输入优化

parent 4d9257fc
......@@ -11,7 +11,7 @@ ext {
"m-user" : "0.0.61.90",
"m-user-medical" : "0.0.61.99",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.20.85",
"m-im-medical" : "0.0.20.86",
"m-im" : "0.0.20.76",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.10",
......@@ -97,7 +97,7 @@ ext {
"m-user" : "0.0.61.90",
"m-user-medical" : "0.0.61.99",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.20.85",
"m-im-medical" : "0.0.20.86",
"m-im" : "0.0.20.76",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.8",
......
......@@ -143,38 +143,38 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
checkInfo()
}
EditTextUtils.disableCopyAndPaste(et_name)
et_idcard.addTextChangedListener(object :TextWatcher{
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?) {
var sLength = s.toString().length;
if(sLength > oldLength){
val msp = SpannableString(s.toString())
msp.setSpan(
AbsoluteSizeSpan(22, true),
Math.max(s.toString().length - 1,0),
s.toString().length,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
)
oldLength = sLength;
et_idcard.setText(msp)
et_idcard.setSelection(sLength)
var message = Message()
message.what = AUTOSIZE;
mHandler.sendMessageDelayed(message,3000)
}else{
oldLength = sLength
}
}
})
//徐总的需求暂时不上了,哇徐总优秀
// et_idcard.addTextChangedListener(object :TextWatcher{
// 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?) {
// var sLength = s.toString().length;
// if(sLength > oldLength){
// val msp = SpannableString(s.toString())
// msp.setSpan(
// AbsoluteSizeSpan(22, true),
// Math.max(s.toString().length - 1,0),
// s.toString().length,
// Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
// )
// oldLength = sLength;
// et_idcard.setText(msp)
// et_idcard.setSelection(sLength)
// var message = Message()
// message.what = AUTOSIZE;
// mHandler.sendMessageDelayed(message,3000)
// }else{
// oldLength = sLength
// }
// }
//
// })
iv_back.setOnClickListener { finish() }
......
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