Example usage for android.widget ListView setFilterText

List of usage examples for android.widget ListView setFilterText

Introduction

In this page you can find the example usage for android.widget ListView setFilterText.

Prototype

public void setFilterText(String filterText) 

Source Link

Document

Sets the initial value for the text filter.

Usage

From source file:com.github.yuukis.businessmap.app.ContactsListFragment.java

@Override
public boolean onQueryTextChange(String newText) {
    ListView listView = getListView();
    if (TextUtils.isEmpty(newText)) {
        listView.clearTextFilter();/*from   ww  w. j  av  a2s .c o  m*/
    } else {
        listView.setFilterText(newText.toString());
    }
    return true;
}