If you can give the code will be better, thank you
CodePudding user response:
Understand the regular under reference https://blog.csdn.net/Water_Marking/article/details/100780504CodePudding user response:
When you call to judge the length is 11CodePudding user response:
To limit the length of the input android: maxLength="11"CodePudding user response:
This judgment get directly to the input of the length of the string is not lineCodePudding user response:
It seems there is still a long road ~!CodePudding user response:
Public void addTextChangedListener (TextWatcher watcher)CodePudding user response:
If just keep 11, limiting the edittext length is the most simple, limited input digital,Is fastidious, research the regular expression, this once and for all,
The ultimate way, you can also customize a EditText,