EditText monitoring method to judge how many characters are input in real time
•
Android
Recently, I was writing a small project, one of which used the function of displaying the number of characters entered in EditText, such as the remaining number of characters in microblog. In EditText, a method addtextchangedlistener is provided to monitor the input text. Below is a demo I wrote myself.
Code implementation:
Layout file main.xml
Activity
The above is the whole content of this article. I hope the content of this article can bring some help to your study or work. At the same time, I also hope to support a lot of programming tips!
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码