Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a "done" button in softkeyboard?

Tags:

how can I have a "done" button in my softkeyboard (Samsung Galaxy 10.1, Android 3.1) when writing in an EditText?

Using

 <EditText      android:id="@+id/comment"      android:layout_width="772dp"      android:layout_height="200dp"/> 

I get

enter image description here

If possible, I'd also like to remove this "attachment" button.

Anybody can help?

EDIT

I managed to get a "Done" button using

android:inputType="textImeMultiLine", 

but the "return" button disappeared...

How can I have both? (I asked this new question here).

like image 720
jul Avatar asked Jan 26 '12 09:01

jul


1 Answers

add this to your EditText xml:

android:imeOptions="actionDone" 

or, to set it from code:

yourEditText.setImeOptions(EditorInfo.IME_ACTION_DONE); 

for more, read this

like image 107
waqaslam Avatar answered Oct 01 '22 05:10

waqaslam