Someone Somewhere
Someone Somewhere

Reputation: 23787

EditText AutoCorrect and AutoComplete not working

This is the editText I've defined in the layout XML:

    <EditText android:id="@+id/msg_text_input"
    android:text="" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_toLeftOf="@id/msg_button_send" 
    android:imeOptions="actionNone"
    android:inputType="text|textAutoComplete|textAutoCorrect|textShortMessage"/>

However, no autocomplete and no autocorrect takes place after I click the EditText and start typing. What am I missing ?

Upvotes: 5

Views: 11964

Answers (3)

Alendia
Alendia

Reputation: 101

I was having some problems with auto-correction and it seems that textAutoComplete means that the input will be automatically completed using an array of possible values provided by the application. So it is not the built in dictionary of android, but for example you can provide a list of countries and the user can input the first few letters while the text will be automatically completed by matching items of the list.

Try using textAutoCorrect alone, and the built in android dictionary suggests possible words, corrects spelling mistakes etc... At least it is working for me...

Upvotes: 10

Someone Somewhere
Someone Somewhere

Reputation: 23787

I was experimenting and made the following change to the layout XML:

    <EditText android:id="@+id/msg_text_input"
    android:text="" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_toLeftOf="@id/msg_button_send" 
    android:imeOptions="actionNone"
    android:autoText="true"/>

again, on the emulator it does nothing new - BUUUUT - on an actual device the autocorrect shows up !!

Moral of the story is: try it on a device because the emulator is .... not so good

Upvotes: 2

locoboy
locoboy

Reputation: 38910

Have you tried using the AutocompleteTextView? http://developer.android.com/resources/tutorials/views/hello-autocomplete.html

Upvotes: 0

Related Questions