I think I've tried every combination, but I can't get the alpha keyboard to show the return key. It's always a "Done" button, which is not useful. On a Nexus 7 (4.1), it's worse, and shows a stupid smiley button along with the Done button, which makes no sense for my application. It's fine to have a Done button as long as I have a return button. Here's one of many options I've tried:
<AutoCompleteTextView
android:id="@+id/annotate_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginLeft="60dp"
android:layout_marginRight="60dp"
android:layout_marginTop="15dp"
android:completionThreshold="1"
android:inputType="textCapSentences|textImeMultiLine"
android:imeOptions="actionDone"
android:lines="1"
android:maxLength="18"
android:textSize="30px" />
I've tried with and without the imeOpitons line, and various inputType options including removing it. There are options to make it a search button (not helpful), but nothing listed to make it a return key. I've also tried with "lines=2", which did not fix it. Any other ideas?
Right now you have set imeOptions="actionDone"
. You say you've tried removing it, but all that does it default it to actionDone
again, per the docs.
Try setting imeOptions="actionNone"
instead. That should give you no action and force a return key.
I don't know that that by itself will guarantee a working multiline AutoCompleteTextView, however. I have one in an app, and it shows a return key on all my devices. The difference is the behaviour of the return key.
For instance, on my GNex (4.1), when you press return it line feeds properly.
On my SGS2 (2.3), nothing happens when you press it. No multiline, no completion. Just a dead button.
It could be the difference in the default EditText style in different APIs, so you should also try setting inputType="textMultiLine"
. There may be a subtle difference between that and textImeMultiLine
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With