Android - Auto Complete Tutorial
If you want to get suggestions , when you type in an editable text field , you can do this via AutoCompleteTextView. It provides suggestions automatically when 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. In order to use AutoCompleteTextView you have to first create an AutoCompletTextView Field in the xml. Its syntax is given below. <AutoCompleteTextView android:id = "@+id/autoCompleteTextView1" android:layout_width = "wrap_content" android:layout_height = "wrap_content" android:layout_alignParentTop = "true" android:layout_centerHorizontal = "true" android:layout_marginTop = "65dp" android:ems = "10" > After that, you have to get a reference of this textview in java. Its syntax is given below. private AutoCompleteTextView actv ; actv = ( AutoCompleteTextVi...