# ContentPager.ContentCallback

# ContentPager.ContentCallback

Artifact:[androidx.contentpager:contentpager](https://developer.android.com/jetpack/androidx/releases/contentpager)  
[View Source](https://cs.android.com/search?q=file:androidx/contentpager/content/ContentPager.java+class:androidx.contentpager.content.ContentPager.ContentCallback)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/contentpager#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/contentpager/content/ContentPager.ContentCallback "View this page in Java")

<br />

```
interface ContentPager.ContentCallback
```

<br />

*** ** * ** ***

Callback by which a client receives results of a query.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[MainThread](https://developer.android.com/reference/kotlin/androidx/annotation/MainThread) [onCursorReady](https://developer.android.com/reference/kotlin/androidx/contentpager/content/ContentPager.ContentCallback#onCursorReady(androidx.contentpager.content.Query,android.database.Cursor))`(query: `[Query](https://developer.android.com/reference/kotlin/androidx/contentpager/content/Query)`, cursor: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`?)` Called when paged cursor is ready. |

## Public functions

### onCursorReady

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/contentpager#1.0.0)  

```
@MainThread
fun onCursorReady(query: Query, cursor: Cursor?): Unit
```

Called when paged cursor is ready. Null, if query failed.  

|                                              Parameters                                              |
|------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| `query: `[Query](https://developer.android.com/reference/kotlin/androidx/contentpager/content/Query) | The query having been executed.                        |
| `cursor: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`?`          | the query results. Null if query couldn't be executed. |