title: implement search on a custom listview
body: <p>i have a <code>listview</code> and <code>EditText</code> field and i wanna implement search, but my <code>listview</code> is a custom <code>listview</code> populated with array of objects of class Item. And when i press key whole <code>listview</code> gone so i guess the problem is that it cannot match char with object of class Item that's why there is no results when i press a key.
  this is my code <br></p>
  
  <pre><code> filterText = (EditText) findViewById(R.id.editTextfilter);
   filterText.addTextChangedListener(filterTextWatcher);
  
      m_items = new ArrayList&lt;Item&gt;();
      phoneList=(ListView)findViewById(android.R.id.list);
      phoneList.setTextFilterEnabled(true);
       this.m_adapter = new ItemAdapter(this,R.layout.row,m_items);
  
  
       phoneList.setAdapter(this.m_adapter);
  
      private TextWatcher filterTextWatcher = new TextWatcher() {
  
      public void afterTextChanged(Editable s) {
      }
  
      public void beforeTextChanged(CharSequence s, int start, int count,
              int after) {
      }
  
      public void onTextChanged(CharSequence s, int start, int before,
              int count) {
  
          m_adapter.getFilter().filter(s.toString());
  
      }
  
  };
  
  @Override
  protected void onDestroy() {
      super.onDestroy();
      filterText.removeTextChangedListener(filterTextWatcher);
  }
  </code></pre>
  
  <p>any help how to get it works         </p>