Commit da541843 by 刘鹏

feat : 隐藏身份证输入优化

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