title: Custom Filtering in listview android
body: <p>I am a new to Android,I have a Listview with some items, each item contains string of size 20 characters(1st character to 16th character are same).I have to add search option to list view in such a way that,depending on last 4 characters only the list should filter. I have seen many sites but i couldn't find.</p>
  
  <p>ex:<br>
  list items : 123456789ABCD1<br>
  list items : 123456789EFGH2<br>
  list items : 123456789IJKL3<br>
  list items : 123456789MNOP4 </p>
  
  <p>if i use </p>
  
  <pre><code> @Override
  public void afterTextChanged(Editable s) {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  public void beforeTextChanged(CharSequence s, int start, int count,
          int after) {
      // TODO Auto-generated method stub
  
  }
  
  @Override
  public void onTextChanged(CharSequence s, int start, int before, int count) {
  
  
  
  
      myAdapter.getFilter().filter(s.toString());
  
  }
  </code></pre>
  
  <p>i should enter<br>
  123456789A in Edittext then only filter occur in listview</p>
  
  <p>My requirement is<br>
  i should enter 
  AB  in Edittext so that it starts filtering</p>
  
  <p>I would appreciate for your ideas. Thanks in advance</p>