How to display the Keyboard when there is a focus in EditText ?

For example, I run Dialog . There is an EditText . When the dialog starts, it is clear that the focus is on the EditText but the keyboard does not appear. What to do?

    1 answer 1

    When you receive a link to the input field, call the post() method, it will start the execution of the Keyboard.show() method after the view has successfully zaachachitsya on the screen

     editText.post(() -> Keyboard.show(editText)) 

    Well, the very method of showing the keyboard. Take the Keyboard into the utility class so that it can be used throughout the project.

     public class Keyboard { public static void show(@NonNull View view) { InputMethodManager inputManager = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); } }