How can I do something, 0.5 second after text changed in my EditText?

前端 未结 14 1245
渐次进展
渐次进展 2020-12-23 08:49

I am filtering my list using an EditText. I want to filter the list 0.5 second after user has finished typing in EditText. I used the afterTextChanged

14条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-23 09:31

    that is the event while and after finish of typing ... add a textWatcher and in the onTextChanged method put :

    if (charSequence.length() > 0){// your code }

提交回复
热议问题