I have an EditText
that I empty after anything is typed into it (for whatever reason). I do this by calling setText("")
Everything works fine, unless the user is not on the default keyboard state (the number state for instance). Because setText
calls InputMethodManager.restartInput
after a key is pressed in the non-default state and I then call setText("")
, restartInput()
gets called, and the keyboard switches back to the default state (in most cases the "ABC" state).
This is very annoying if the user needs to type multiple numbers or special characters, etc... Is there any way to do this without restartInput
getting called?