(Android itself has done a lot of design, such as limiting the length, limiting the input of integers or numbers. Sometimes this is still not possible. You can customize the program based on your needs. First touch: EditText.addTextChangedListener, EditText The removeTextChange program uses a small technique in many places: specify the input type of the text box. That is, you can only enter certain types of characters, or even certain characters. Android itself has done a lot of design, such as limiting the length, limiting the input of integers or numbers. Sometimes this is still not possible. You can customize the program based on your needs. First touch: EditText.addTextChangedListener, EditText.removeTextChangedListener, EditText setFilters。 Method: Add a customized TextChange listener to EditText. Check whether the input characters are legal in the modification monitoring.
EditTextDemo\bin\cn\edu\hust\cs\fgl\test\EditTextDemo$1.class
EditTextDemo\bin\cn\edu\hust\cs\fgl\test\EditTextDemo$MyTextWatcher.class
EditTextDemo\bin\cn\edu\hust\cs\fgl\test\EditTextDemo.class
EditTextDemo\bin\cn\edu\hust\cs\fgl\test\R$attr.class
EditTextDemo\bin\cn\edu\hust\cs\fgl\test\R$color.class
EditTextDemo\bin\cn\edu\hust\cs\fgl\test\R$drawable.class
EditTextDemo\bin\cn\edu\hust\cs\fgl\test\R$id.class
EditTextDemo\bin\cn\edu\hust\cs\fgl\test\R$layout.class
EditTextDemo\bin\cn\edu\hust\cs\fgl\test\R$string.class
EditTextDemo\bin\cn\edu\hust\cs\fgl\test\R.class
EditTextDemo\bin\classes.dex
EditTextDemo\bin\EditTextDemo.apk
EditTextDemo\bin\resources.ap_
EditTextDemo\gen\cn\edu\hust\cs\fgl\test\R.java
EditTextDemo\res\drawable\icon.png
EditTextDemo\res\layout\main.xml
EditTextDemo\res\values\color.xml
EditTextDemo\res\values\strings.xml
EditTextDemo\src\cn\edu\hust\cs\fgl\test\EditTextDemo.java
EditTextDemo\.classpath
EditTextDemo\.project
EditTextDemo\AndroidManifest.xml
EditTextDemo\default.properties
EditTextDemo\proguard.cfg)