Search code examples
androidlistselectable

android : show matching items as a list as user types


I have a list of names maintained in my app. Now in an edit text when user start typing a name i will match for that substring among the names and want to show user as a selectable list . It is similar to email suggestions shown by mail applications. I have done the matching part. How can i show the list of matching items . is it a listview ?


Solution

  • You can use autocompleteTextView for this scenario. Refer to this link http://developer.android.com/reference/android/widget/AutoCompleteTextView.html.