Good day! In my application, I needed to implement text input from the on-screen keyboard without using EditText . I want the user-entered text to be drawn with a Canvas on a SurfaceView . The keyboard itself is called by the following code:
InputMethodManager imm = (InputMethodManager) mainActivity.getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(mainActivity.getCurrentFocus(),InputMethodManager.RESULT_SHOWN); The focus is a class object inherited from SurfaceView and implementing OnKeyListener . The problem is that the onKey() method is not called in all cases, for example, if you switch the keyboard to Russian, or use a non-standard keyboard, then onKey() will not be called. However, everything works fine with the qwerty (standard keyboard) layout. How, then, is it better to get information about the characters entered? Where can I read about the interaction of IME and EditText ? How does the latter get characters from the keyboard? Thank you in advance!