Search code examples
androidandroid-edittextandroid-softkeyboardandroid-touch-event

Simulate Touch event on EditText to show soft keyboard


I have a invisible EditText: ReplyInput and a button: ShowReply.

I want to show the ReplyInput and the soft keyboard after ShowReply is clicked.

Anyone has any idea about that?

Thank for reading :)


Solution

  • Something like that:

    InputMethodManager manager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
    manager.showSoftInput(ReplyInput, InputMethodManager.SHOW_IMPLICIT);