4

Hey all , first post on Stack so be patient.

I am trying to close the IME after user presses enter in EditText.

I've tried using android:imeOptions="actionDone"/"actionNext" in the layout.xml

I've set up setOnEditorActionListener on said EditText and am looking for code to signal IME it's done.

tnx.

ShreevatsaR
  • 35,974
  • 16
  • 97
  • 122
Wolfie
  • 51
  • 5

1 Answers1

6

This works just fine

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
Lope
  • 4,836
  • 4
  • 27
  • 40