2

I have an EditText in Android configured for the number keyboard, and I would like the keyboard's button to say "next", while mine is saying "done". How can I change that? I already tried:

   <com.innovattic.font.FontEditText
   style="@style/CadastroTextBoxStyle"
   android:hint="CEP"
   android:id="@+id/etCEP"
   android:inputType="number"
   android:singleLine="true"
   android.imeOptions="actionNext" />

And also this:

    etCEP.setImeActionLabel("Next", KeyEvent.KEYCODE_ENTER);

But it still says done. What else can I do?

Thanks

user2527666
  • 433
  • 5
  • 14
  • I think I've seen this answered around on the SO community... – Alex K Nov 06 '14 at 21:56
  • 1
    For example here: http://stackoverflow.com/a/22935932/995891 -> try a different phone, softkeyboard, they decide if they like to display something different. All Ime options are just "wishes" – zapl Nov 06 '14 at 22:03

1 Answers1

2

As can be seen in Specifying the Input Method Type, you do not need to call TextView.setImeActionLabel(CharSequence, int) and you have to instead just provide a android:imeOptions value such as actionSend or actionNext in XML attributes to change the label accordingly.

This is not working for you because you have mistyped : as . in your attributes. Switching those out should fix your issue in no time.

Valter Jansons
  • 3,904
  • 1
  • 22
  • 25