Commit 94d2bc0a by 刘鹏

feat : 身份证输入优化效果优化

parent 94f0b148
...@@ -151,7 +151,7 @@ class MedicalAddNewArchivesActivity : BaseActivity() { ...@@ -151,7 +151,7 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
if(sLength > oldLength){ if(sLength > oldLength){
val msp = SpannableString(s.toString()) val msp = SpannableString(s.toString())
msp.setSpan( msp.setSpan(
AbsoluteSizeSpan(18, true), AbsoluteSizeSpan(20, 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
...@@ -162,6 +162,8 @@ class MedicalAddNewArchivesActivity : BaseActivity() { ...@@ -162,6 +162,8 @@ class MedicalAddNewArchivesActivity : BaseActivity() {
var message = Message() var message = Message()
message.what = AUTOSIZE; message.what = AUTOSIZE;
mHandler.sendMessageDelayed(message,1000) mHandler.sendMessageDelayed(message,1000)
}else{
oldLength = sLength
} }
} }
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<EditText <EditText
android:id="@+id/et_idcard" android:id="@+id/et_idcard"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="22dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:digits="0123456789xX" android:digits="0123456789xX"
android:inputType="number" android:inputType="number"
......
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