Edittext imeOptions actionDone not working with digits attribute?

Tijo Joseph picture Tijo Joseph · Feb 27, 2017 · Viewed 7.3k times · Source

I have an Editext . It contains attribute digits and imeOptions (actionDone) together.

<android.support.v7.widget.AppCompatEditText
        android:id="@+id/edit_text_name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:digits="1234567890abcdefghijklmnopqrstuvwxyz....."
        android:hint="@string/item_name"
        android:imeOptions="actionDone"
        android:maxLines="1" />

The actionDone (Done button in Softkeyword) not found while using digit && imeOptions attributes together . We can only find enter button which doesn't make any focus change. I have tried it by skipping digit attribute , then imeOptions working correctly. Thanks in advance

Answer

Ranjithkumar picture Ranjithkumar · Feb 27, 2017

Just add singleLine="true" to your edittext

  android:singleLine = "true"