Stay organized with collections
Save and categorize content based on your preferences.
FilterQueryProvider
interface 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 |
abstract Cursor! |
Runs a query with the specified constraint.
|
Public methods
runQuery
abstract fun runQuery(constraint: CharSequence!): Cursor!
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 |
Return |
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# FilterQueryProvider\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nFilterQueryProvider\n===================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/widget/FilterQueryProvider \"View this page in Java\") \n\n```\ninterface FilterQueryProvider\n```\n\n|-----------------------------------------|\n| [android.widget.FilterQueryProvider](#) |\n\nThis class can be used by external clients of CursorAdapter and CursorTreeAdapter to define how the content of the adapter should be filtered.\n\nSummary\n-------\n\n| Public methods ||\n|----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Cursor](../database/Cursor.html#)! | [runQuery](#runQuery(kotlin.CharSequence))`(`constraint:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` Runs a query with the specified constraint. |\n\nPublic methods\n--------------\n\n### runQuery\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun runQuery(constraint: CharSequence!): Cursor!\n```\n\nRuns 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.\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `constraint` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!: the constraint with which the query must be filtered |\n\n| Return ||\n|-------------------------------------|----------------------------------------------------|\n| [Cursor](../database/Cursor.html#)! | a Cursor representing the results of the new query |"]]