Reputation: 15502
I have an EditText view:
<EditText
android:id="@+id/commentEditText"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:ems="10"
android:imeOptions="actionDone"
android:inputType="textMultiLine" />
I want to disable the "enter
" key when user insert input.
Instead I want the keyboard to have a "done" key that will close the softkeyboard.
does adding android:imeOptions="actionDone"
isn't enough?
The "enter" key is still on my Nexus 4 and no done
key is there.
Do I have to override onEditorAction
or does "action_done
" has a default behavior?
Thanks,
Upvotes: 0
Views: 168
Reputation: 93708
The keyboard itself decides what to do with the ime options. Your keyboard may have decided not to display ime option strings. I don't blame them- having done it, morphing the enter key like that is a pain in the ass, and as many users complained about it as liked it. There's no way to force it to, it depends on that particular keyboard having decided to code it in.
Upvotes: 0