4

I need to add the NEXT and PREV button to my soft keyboard which appears on clicking on an edit text field in my activity page. Kindly provide me with the pointers for tutorials on implementing this concept.

Thanks in advance.

Prem
  • 4,823
  • 4
  • 31
  • 63

2 Answers2

5

You can do it in xml by

android:imeOptions="actionNext"

or by programatic by

yourEditText.setImeOptions(EditorInfo.IME_ACTION_NEXT);
san
  • 1,845
  • 13
  • 23
  • 3
    My requirement is not to add either next/ prev button. I want to add both such that it appears on top of soft keyboard. – Prem Jan 11 '12 at 03:57
  • 1
    You cannot have both next and prev. You can have next and done but not next and prev. Just check this url. http://developer.android.com/resources/articles/on-screen-inputs.html – san Jan 11 '12 at 04:15
1

There is method for EditText

myEditText.setImeOptions(EditorInfo.IME_ACTION_NEXT);

By using above method you can add Next Button to soft keyboard.

You can refer the link for more information For more info

nisha.113a5
  • 2,024
  • 16
  • 30