I have an EditText
View which is edited by setText()
from my code and by the user via (soft/hard) keyboard and - if possible by speech input. I want to handle input made by my code in another way than normal user input: if a user input happens, a internal event shall be fired. But I don't know how to differentiate between both. Previously - when developing on the emulator - I used the onKeyDown()
method to catch user input. However, when testing on a real device, I found out, that onKeyDown()
isn't triggered from soft keyboard input. Additionally speech input wouldn't be recognized by this, though I consider this to be a minor flaw. So that solution is no option for me.
On the other hand there is the onTextChanged()
method, but this is triggered by both setText()
and keyboard input. So how can I differentiate between both or which method is only called by user input, but not when using setText()
, so can I overwrite it?