Articles

Affichage des articles associés au libellé widgets

Android tutorial : AutoCompleteTextView example

Image
AutoCompleteTextView is sort of hybridization between an EditText and Spinner. It is a subclass of EditText. With auto-complete,the completion suggestions are  automatically shown while the user is typing. The list of suggestions is displayed in a drop down menu from which the user can choose an item to replace the content of the edit box with.The different  suggestions are displayed in a list of choices that looks like a Spinner. The user can then continue its input (if the word is not in the list) or choose an entry in it which will become the value of the field.  In addition, the property android: completionThreshold of AutoCompleteTextView allows  to specify a minimum number of characters to be written before the list of proposals  appears.  We can provide to AutoCompleteTextView an adapter containing the list of  Candidate values ​​using setAdapter () but as the user can enter text that is not in this list, AutoCompleteTextView does not use selection listeners. It is