title: How to write a  custom filter for ListView with ArrayAdapter
body: <p>I have a ListView which is connected to a ArrayAdapter where Artist is a simple class of mine, that has only an id and a name.</p>
  
  <p>Now I want to filter the ListView so I call:</p>
  
  <pre><code>artistAdapter.getFilter().filter("bla", new Filter.FilterListener() {
      public void onFilterComplete(int count) {
          Log.d(Config.LOG_TAG, "filter complete! count: " + count); // returns 8
          Log.d(Config.LOG_TAG, "adapter count: " + artistAdapter.getCount()); // return 1150
      }
  });
  </code></pre>
  
  <p>The first debug statement prints a count of 8. That's the corrent count for listitems that start with "bla" but the adapter does not get it. The second debug statement prints a count 1150 items. That's the complete number of items in the list.</p>
  
  <p>So somehow the filter does not tell the adapter that it has filtered the underlying data.</p>
  
  <p>I want to know now: do I have do code something in my adapter so it gets the updates from the filter? Do I have to write a custom filter? What do I have to do?</p>