I have a bunch of EditTexts in my Android application, each with InputMethod set to numberSigned. My target device does not have a hardware keyboard and uses the software keyboard for numeric entry. Android replaces the standard "Done" button to the right of the entry box with a "Next" button. How can I use "Done" instead?
Asked
Active
Viewed 5.0k times
87
-
I need to disable the next button. for that what can i do? i dont need done button in that place. Thanks – Sivakumar Purushothaman Mar 31 '14 at 07:36
-
@SivakumarPurushothaman I can't test for you at the moment, but does actionNone work? – Andrew Buss Mar 31 '14 at 23:14
2 Answers
217
Try adding android:imeOptions="actionDone"
to your EditText
.

Pang
- 9,564
- 146
- 81
- 122

Jim Blackler
- 22,946
- 12
- 85
- 101
-
1but after selecting the text in edittext, Done button changes in to EDIT button and show cut,copy,paste..how to disable this. – Monty Dec 27 '12 at 10:14
-
1What about Multi-Line EditTexts? This doesn't seem to work for them. :/ – Sheharyar Aug 11 '13 at 11:06
-
7@SheharyarNaseer the input type for a multiline EditText needs to be the following in your EditText XML: `android:inputType="textImeMultiLine"`. Then the `android:imeOptions` will be work. – macklinu Dec 04 '13 at 20:07
-
Hi, Thanks for this. I face some issue if i am wrong please correct me , This work in some device and not some of. In HTC and Asus that Done not shown and in Samsung device that Done Visible. :) – Dharmik Patel Sep 12 '14 at 13:23
-
Note : This solution is also working well for Xamarin : YourEditText.ImeOptions = Android.Views.InputMethods.ImeAction.Done; – YumeYume Jun 01 '17 at 09:31
55
This can also be accomplished in code with:
myEditText.setImeOptions(EditorInfo.IME_ACTION_DONE);

tomwhipple
- 2,850
- 27
- 28