title: Filter for android ListView - Space Character
body: <p>I want to filter my <code>listView</code> using an <code>EditText</code> box and using the adapter <code>getFilter()</code> function. It works just fine until I put a space character in the text box. </p>
  
  <p>Edit: It's a <strong>SimpleAdapter not ArrayAdapter</strong></p>
  
  <p>If my list contains these words: {"Apple", "Banana", "Red Apple"}
  If I type "apple" it will return all the items containing the word apple in it (Apple and Red Apple).
  If I type "apple " it won't returning anything.</p>
  
  <p>Any ideas? Here's the code:</p>
  
  <pre><code>searchBox = (EditText) findViewById(R.id.searchBox);
  
  searchBox.addTextChangedListener(filterTextWatcher);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>private TextWatcher filterTextWatcher = new TextWatcher() {
  
  public void onTextChanged(CharSequence s, int start, int before, int count) {
      // TODO Auto-generated method stub          
  }
  
  public void beforeTextChanged(CharSequence s, int start, int count,
              int after) {
      // TODO Auto-generated method stub          
  }
  
  public void afterTextChanged(Editable s) {
      // TODO Auto-generated method stub
      myAdapter.getFilter().filter(s.toString());
  }
  };
  </code></pre>