Have you viewed AutoCompleteTextView?
It displays what you want. Now you need an adapter that implements Filterable to create a set of five. Filterable says that the object can create a Filter object. Filter objects use a thread pool and send filtering to a separate worker thread and bind to a view in the user interface thread.
So let's say we have
public class TextAdapter extends BaseAdapter implements Filterable { List<String> myList; Filter myFilter; TextAdapter(String[] strings) { myList = Arrays.asList(strings); myFilter = new MyFilter(myList); } ...
source share