protected class BaseRecipientAdapter.DirectoryFilter extends Filter
Filter.Delayer, Filter.FilterListener, Filter.FilterResults
Constructor and Description |
---|
DirectoryFilter(BaseRecipientAdapter.DirectorySearchParams params) |
Modifier and Type | Method and Description |
---|---|
int |
getLimit() |
protected Filter.FilterResults |
performFiltering(CharSequence constraint)
Invoked in a worker thread to filter the data according to the
constraint.
|
protected void |
publishResults(CharSequence constraint,
Filter.FilterResults results)
Invoked in the UI thread to publish the filtering results in the
user interface.
|
void |
setLimit(int limit) |
convertResultToString, filter, filter, setDelayer
public DirectoryFilter(BaseRecipientAdapter.DirectorySearchParams params)
public void setLimit(int limit)
public int getLimit()
protected Filter.FilterResults performFiltering(CharSequence constraint)
Filter
Invoked in a worker thread to filter the data according to the
constraint. Subclasses must implement this method to perform the
filtering operation. Results computed by the filtering operation
must be returned as a Filter.FilterResults
that
will then be published in the UI thread through
Filter.publishResults(CharSequence,
android.widget.Filter.FilterResults)
.
Contract: When the constraint is null, the original data must be restored.
performFiltering
in class Filter
constraint
- the constraint used to filter the dataFilter.filter(CharSequence, android.widget.Filter.FilterListener)
,
Filter.publishResults(CharSequence, android.widget.Filter.FilterResults)
,
Filter.FilterResults
protected void publishResults(CharSequence constraint, Filter.FilterResults results)
Filter
Invoked in the UI thread to publish the filtering results in the
user interface. Subclasses must implement this method to display the
results computed in Filter.performFiltering(java.lang.CharSequence)
.
publishResults
in class Filter
constraint
- the constraint used to filter the dataresults
- the results of the filtering operationFilter.filter(CharSequence, android.widget.Filter.FilterListener)
,
Filter.performFiltering(CharSequence)
,
Filter.FilterResults