Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EditText AutoCorrect and AutoComplete not working

Tags:

android

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 ?

like image 558
Someone Somewhere Avatar asked Mar 25 '11 01:03

Someone Somewhere


2 Answers

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...

like image 173
Alendia Avatar answered Oct 19 '22 23:10

Alendia


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

like image 35
Someone Somewhere Avatar answered Oct 19 '22 23:10

Someone Somewhere