I am trying to write a custom IME for the Android OS. However, I cannot figure out how to detect when the user is entering e.g. an EditText.
I have already tried overriding some of the on...() methods of InputMethodService to no avail.
The documentation hasn’t been particularly helpful to me here, I’m having a hard time understanding the description of the InputMethodService class.
Just for documentation purposes: I found the answer myself.
When a view is entered, the
InputMethodService‘sonStartInput(EditorInfo attribute, boolean restarting)method is called. If theEditorInfo‘sInputTypeis != 0, the view is editable, it seems.