Question: ```
String filterText="abc";
adapter.getFilter().filter(filterText);

```

I want to filter my adapter even if :

```
filterText="Abc";

```

or 

```
filterText="aBc";

```

and so on.

Answer: 
As you are saying you have a custom filter, just modify that..

See the below code:-

```
private class TestFilter extends Filter
{

@Override
protected FilterResults performFiltering(CharSequence constraint) 
{
FilterResults results = new FilterResults();
ArrayList<HashMap<String, Object>> filteredItems = null;

if (constraint != null && constraint.toString().length() > 0) 
{
      for (int index = 0; index < dataSource.getData().size(); index++) 
      {
HashMap<String, Object> existingItem = dataSource.getData().get(index);
String titleString = existingItem.get(dataSource.getSearchKey()).toString();

if(titleString.toLowerCase().contains(constraint.toString().toLowerCase()))
{
      //please modify the filtering accotding to your code
      HashMap<String, Object> newItem = new HashMap<String, Object>();
      newItem = (HashMap<String, Object>) existingItem.clone();
      newItem.put(ListViewDataSource.SECTION_HEADER_KEY, SEARCH_RESULT);
      filteredItems.add(newItem);
      newItem = null;
}
    }
}
results.values = filteredItems;
return results;
}

@Override
protected void publishResults(CharSequence constraint,FilterResults results) 
{

}
}

```
You can do it by converting the both strings , i.e what you want to search and from what you are going to search into lowercase. Here is a sample of how I do it. 

```
private class InboxFilter extends Filter {
@Override
protected FilterResults performFiltering(CharSequence constraint) {

        constraint = constraint.toString().toLowerCase();
        FilterResults result = new FilterResults();
        if (constraint != null && constraint.toString().length() > 0) {
            ArrayList<Inbox> filteredItems = new ArrayList<Inbox>();

            for (int i = 0; i < originalInbox.size(); i++) {
                Inbox inboxItem = originalInbox.get(i);
                if ((inboxItem.getMessage().toString().toLowerCase()
                        .contains(constraint))
                                                            ||(inboxItem.get_group_name()!=null&&inboxItem.get_group_name().toString()
                                                                                                                                      .toLowerCase().contains(constraint))
    || (inboxItem.getfromname()!=null)&&(inboxItem.getfromname().toString()
                                        .toLowerCase().contains(constraint))
                                        || (inboxItem.getfrom()!=null)&&(inboxItem.getfrom().toString()
                                                .toLowerCase().contains(constraint))
                                                || (inboxItem.getTo()!=null)&&(inboxItem.getTo().toString()
                                                .toLowerCase().contains(constraint))){filteredItems.add(inboxItem);}}
            result.count = filteredItems.size();
            result.values = filteredItems;
        } else {
            synchronized (this) {
                result.values = originalInbox;
                result.count = originalInbox.size();
            }
        }
        return result;
    }

```