Search code examples
androidinputkeyboardinputmethodmanager

android InputMethodManager input type


Is it possible to get the current input type (text or numbers) from keyboard? Or is there an event that is triggered when input type is changed? I need to set input type on a screen based on what input type was when user exited that screen. Thanks


Solution

  • editText.getInputType();
    

    These method return the Input type of the of the EditTextBox in integer format.

    you can get the of all the InputTyp by using InputType interface like this way

    InputType.TYPE_CLASS_NUMBER;
    InputType.TYPE_CLASS_TEXT;