0

I have an application where user needs to input some text. When I click the editText area a keyboard appears and then I input the text after which I have to press the "back" key on my phone to hide the keyboard and then press the submit button which is getting annoying.

How do I get that "ok" button that does it for me which I am used to? I have Android version 2.3.6 on my phone. Is this even available at this API level ?

monolith
  • 1,606
  • 1
  • 12
  • 21
  • Go to this: [http://stackoverflow.com/questions/3276448/android-edit-text-go-button](http://stackoverflow.com/questions/3276448/android-edit-text-go-button) – M D Mar 09 '14 at 16:44
  • Go to ur XML file to the EditText and add imeOptions. – Luser_k Mar 09 '14 at 22:28

1 Answers1

0

Use onEditorActionListener http://developer.android.com/reference/android/widget/TextView.OnEditorActionListener.html on your EditText.

Also see: EditorInfo http://developer.android.com/reference/android/view/inputmethod/EditorInfo.html

dnkoutso
  • 6,041
  • 4
  • 37
  • 58