How can I build a search bar where while I\'m typing the results are shown in the ListView in which I\'m searching?
For example, I have a list view with
You can't do this with the search bar. But the listview has a possibility to filter on key pressed, like it is done in the contacts. The user simply starts typing and the list gets filtered then. Filtering is not really like searching. If you list contains the word foo somewhere and you type oo foo will be filtered out, but if you type fo it will stay even if the list item is call bar foo.
You simply have to enable it:
ListView lv = getListView();
lv.setTextFilterEnabled(true);
I don't know how this is done if you don't have a hardware keyboard. I'm using the droid and starting to type starts the list to filter and to show only matching results.