Reputation: 8981
I have an EditText
field in my layout, with the android:inputType="number"
. The thing that bothers me is that in the bottom right corner, there is a button saying next
, is it possible to customize this to have an Done
button here instead which will trigger the keyboard to "go away"?
Upvotes: 0
Views: 1934
Reputation:
Use following code
editText.setImeOptions(EditorInfo.IME_ACTION_DONE);
or android:imeOptions in xml file
Upvotes: 0
Reputation: 2519
in your xml file put android:imeOptions="actionDone"
to EditText
Upvotes: 3
Reputation: 132992
You need to set the android:imeOptions attribute equal to actionDone
for Relative EditText as:
<EditText
android:id="@+id/edittxt_done"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Enter text"
android:imeOptions="actionDone"
/>
Upvotes: 1
Reputation: 109257
In your EditText properties set android:imeOptions
attribute
android:imeOptions="actionDone"
Upvotes: 2