code: @Override
  	public Filter getFilter() {
  		Filter filter = new Filter() {
  			@Override
  			protected FilterResults performFiltering(CharSequence constraint) {
  				ArrayList<Pair<String, ?>> filteredPrefs = new ArrayList<Pair<String, ?>>();
  				FilterResults filterFriends = new FilterResults();
  				if (!SharedPreferenceUtils.isEmptyString(constraint)) {
  					for (Pair<String, ?> keyValue : keyValSet) {
  						String constraintString = constraint.toString();
  						String prefixKey = "key: ";
  						String prefixValue = "value: ";
  						String first = keyValue.first;
  						Object second = keyValue.second;
  						if (constraintString.toLowerCase().startsWith(prefixKey)) {
  							if (first.toLowerCase().contains(constraintString.toLowerCase().substring(prefixKey.length()))) {
  								filteredPrefs.add(keyValue);
  							}
  						} else if (constraintString.toLowerCase().startsWith(prefixValue)) {
  							if (second != null) {
  								if (second.toString().contains(constraintString.toLowerCase().substring(prefixValue.length()))) {
  									filteredPrefs.add(keyValue);
  								}
  							}
  						} else {
  							if (first.equalsIgnoreCase(constraintString) || (second != null && second.toString()
  							                                                                         .equalsIgnoreCase(constraintString))) {
  								filteredPrefs.add(keyValue);
  							}
  						}
  					}
  				} else {
  					filteredPrefs = keyValSet;
  				}
  				filterFriends.count = filteredPrefs.size();
  				filterFriends.values = filteredPrefs;
  				return filterFriends;
  			}
  
  			@Override
  			protected void publishResults(CharSequence constraint, FilterResults results) {
  				filteredCollection = (ArrayList<Pair<String, ?>>) results.values;
  
  				notifyDataSetChanged();
  			}
  		};
  		return filter;
  	}
docs: <p>Returns a filter that can be used to constrain data with a filtering
  pattern.</p>
  
  <p>This method is usually implemented by {@link android.widget.Adapter}
  classes.</p>
  
  @return a filter used to constrain data