Stay organized with collections
Save and categorize content based on your preferences.
FilterQueryProvider
public
interface
FilterQueryProvider
android.widget.FilterQueryProvider
|
This class can be used by external clients of CursorAdapter and
CursorTreeAdapter to define how the content of the adapter should be
filtered.
Summary
Public methods
runQuery
public abstract Cursor runQuery (CharSequence constraint)
Runs a query with the specified constraint. This query is requested
by the filter attached to this adapter.
Contract: when constraint is null or empty, the original results,
prior to any filtering, must be returned.
Parameters |
constraint |
CharSequence : the constraint with which the query must
be filtered |
Returns |
Cursor |
a Cursor representing the results of the new query |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# FilterQueryProvider\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nFilterQueryProvider\n===================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/widget/FilterQueryProvider \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nFilterQueryProvider\n`\n\n\n`\n\n\n`\n\n|------------------------------------|\n| android.widget.FilterQueryProvider |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThis class can be used by external clients of CursorAdapter and\nCursorTreeAdapter to define how the content of the adapter should be\nfiltered. \n**See also:**\n\n- [runQuery(CharSequence)](/reference/android/widget/FilterQueryProvider#runQuery(java.lang.CharSequence))\n\nSummary\n-------\n\n| ### Public methods ||\n|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[Cursor](/reference/android/database/Cursor) | ` `[runQuery](/reference/android/widget/FilterQueryProvider#runQuery(java.lang.CharSequence))`(`[CharSequence](/reference/java/lang/CharSequence)` constraint) ` Runs a query with the specified constraint. |\n\nPublic methods\n--------------\n\n### runQuery\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract Cursor runQuery (CharSequence constraint)\n```\n\nRuns a query with the specified constraint. This query is requested\nby the filter attached to this adapter.\n\nContract: when constraint is null or empty, the original results,\nprior to any filtering, must be returned.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------|\n| `constraint` | `CharSequence`: the constraint with which the query must be filtered \u003cbr /\u003e |\n\n| Returns ||\n|----------------------------------------------|-----------------------------------------------------------|\n| [Cursor](/reference/android/database/Cursor) | a Cursor representing the results of the new query \u003cbr /\u003e |"]]