Class AdvancedAdapter.AdvancedFilter

java.lang.Object
android.widget.Filter
eltos.simpledialogfragment.list.AdvancedAdapter.AdvancedFilter
Enclosing class:
AdvancedAdapter<T>

public abstract class AdvancedAdapter.AdvancedFilter extends android.widget.Filter
An advanced filter where only the matches(T, java.lang.CharSequence) method needs to be overwritten
  • Constructor Details

  • Method Details

    • isIgnoreCase

      protected boolean isIgnoreCase()
    • isMatchWordBeginning

      protected boolean isMatchWordBeginning()
    • matches

      protected abstract boolean matches(T object, @NonNull CharSequence constraint)
    • matchesWord

      @Deprecated protected boolean matchesWord(String string, @NonNull CharSequence constraint)
      Deprecated.
      Use matches(String) instead
      Parameters:
      string - string to search in
      constraint - string to search for
      Returns:
      true if string contains the constraint, false otherwise
    • matches

      protected boolean matches(String string)
      Simple string matcher that uses the current constraint and flags as specified upon creation.
      Parameters:
      string - the string to search in
      Returns:
      true if at least one match is found
    • performFiltering

      @Nullable protected android.widget.Filter.FilterResults performFiltering(@Nullable CharSequence constraint)
      Specified by:
      performFiltering in class android.widget.Filter
    • publishResults

      protected void publishResults(CharSequence constraint, @Nullable android.widget.Filter.FilterResults results)
      Specified by:
      publishResults in class android.widget.Filter