@Override
 protected void performFiltering(CharSequence text, int start, int end, int keyCode) {
   if (start < prefix.length()) {
     start = prefix.length();
   }
   Filter filter = getFilter();
   if (filter != null) {
     filter.filter(text.subSequence(start, end), this);
   }
 }
Ejemplo n.º 2
0
  public void doFilter(Uri uri, String filterString) {
    if (!uri.equals(mUri)) {
      mUri = uri;

      Cursor contactCursor = runQuery(filterString);

      if (mContactAdapter == null) {
        mContactAdapter = new ContactAdapter(mContext, contactCursor);
        mFilter = mContactAdapter.getFilter();
        mFilterList.setAdapter(mContactAdapter);
      } else {
        mContactAdapter.changeCursor(contactCursor);
      }

      // contactCursor.close();

    } else {
      mFilter.filter(filterString);
    }
  }
Ejemplo n.º 3
0
 public void onTextChanged(CharSequence s, int start, int before, int count) {
   Log.d(TAG, "filtering + " + s);
   Filter filter = mAdapter.getFilter();
   filter.filter(s);
 }
Ejemplo n.º 4
0
 public void doFilter(String filterString) {
   mFilter.filter(filterString);
 }
package com.lib.custom.widget;
Ejemplo n.º 6
0
 boolean filterIncludesItem(T graphObject) {
   return filter == null || filter.includeItem(graphObject);
 }