title: Simple search filtering in Android listView
body: <p>I want to add simple search filter in my Android ListView just like here :</p>
  
  <pre><code>Search.addTextChangedListener(new TextWatcher() {
  
          @Override
          public void onTextChanged(CharSequence cs, int arg1, int arg2,
                  int arg3) {
  
              MainActivity.this.adapter.getFilter().filter(cs);
          }
  
          @Override
          public void beforeTextChanged(CharSequence arg0, int arg1,
                  int arg2, int arg3) {
  
          }
  
          @Override
          public void afterTextChanged(Editable arg0) {
  
          }
      });
  </code></pre>
  
  <p>This code is from tutorial found in the internet (I have lost an url). It is based on ArrayAdapter but in my class I am using SimpleCursorAdapter and this code doesn't work. I mean I can type but it won't filter search results. Here is my code : </p>
  
  <pre><code>// Create the pointer to the desired data
          dataAdapter = new SimpleCursorAdapter(
                  this, R.layout.contact_row, contactsCursor, columns, to, 0);
          ListView listView = (ListView) findViewById(R.id.list);
          Search = (EditText) findViewById(R.id.inputSearch); 
  
          Search.addTextChangedListener(new TextWatcher() {
  
              @Override
              public void onTextChanged(CharSequence cs, int arg1, int arg2,
                      int arg3) {
  
                  ContactListActivity.this.dataAdapter.getFilter().filter(cs);
              }
  
              @Override
              public void beforeTextChanged(CharSequence arg0, int arg1,
                      int arg2, int arg3) {
  
              }
  
              @Override
              public void afterTextChanged(Editable arg0) {
  
              }
          });
  </code></pre>
  
  <p>Is there any way to set this filter function on SimpleCursorAdapter? </p>