I have an edittext and a listview in my application my listview show contact list. I want listview filter with edittext. I searched a lot on google and found some examles bu
Android has an built in search bar feature .
Step 1 Add the following in your manifest :
Step2
onSearchRequested(); will call your search bar .You can add this in on click of your search button.
Step3 Simply call this function in your activity's on create :
private void handleIntent(Intent intent) {
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
myList.clear();
String query = intent.getStringExtra(SearchManager.QUERY);
new getQueryResultAndPopulateListTask(this, query).execute();
}
}