I have a EditText and I want to inform each time text changes (with entering each character). What implementation should I use and what function should I override?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Use the addTextChangedListener
method on your EditText and make your class implement or define an inner class implementing the TextWatcher
class:
https://developer.android.com/reference/android/widget/TextView.html#addTextChangedListener(android.text.TextWatcher)
回答2:
You can declare a boolean variable as false and at each time et.edited make it true