Search in ListView atr Android
<p>My code for search with TextChangedListener does't work. I nothing changes in ListView can u say me where is my problem?  I read it in this article <a href="http://www.androidhive.info/2012/09/android-adding-search-functionality-to-listview/" rel="nofollow">http://www.androidhive.info/2012/09/android-adding-search-functionality-to-listview/</a> and in other materials also I tryed  </p>

<pre><code>    list.setTextFilterEnabled(true);
    list.setFilterText(s.toString());
</code></pre>

<p>but it was't work too</p>

<pre><code>code:

   public class SicksListActivity extends Activity implements TextWatcher{
private DBHelper dbHelper;
private SimpleCursorAdapter adapter;
public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.sickness_list); 
    displaySicks();
}
private void displaySicks(){
    Queries queries=new Queries();
    Cursor c=queries.getAllSicks(this);
    ListView list=(ListView)findViewById(android.R.id.list);
    EditText inputText=(EditText)findViewById(R.id.sick_input_search);
    inputText.addTextChangedListener(this);
    String [] colums={SicknessDB.NAME};
    int [] views={android.R.id.text1};
    adapter=new SimpleCursorAdapter(this,
            android.R.layout.simple_expandable_list_item_1, c, colums,views);
    list.setAdapter(adapter);
}

public void afterTextChanged(Editable s) {
    // TODO Auto-generated method stub

}
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
    // TODO Auto-generated method stub

}
public void onTextChanged(CharSequence s, int start, int before, int count) {
    // TODO Auto-generated method stub
    this.adapter.getFilter().filter(s);

}
</code></pre>

<p>}</p>
