How to monitor the input of EditText?

problem description

now there is a requirement to listen only for content changes caused by keyboard input in EditText, while ignoring text changes caused by setText () .

desired effect:

  1. enter a paragraph of text through the keyboard: the listener is called
  2. call setText ("aaaa") : the listener is not called

and TextWatcher is called in both cases.
is there a correct solution to achieve the above results?

Jul.27,2021

found the solution here.
https://www.jianshu.com/p/e6a.

xxxEdit.removeTextChangedListener(watcher);
xxxEdit.setText("");
xxxEdit.addTextChangedListener(watcher);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e52323-43745.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e52323-43745.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?