# ResourceCursorAdapter

# ResourceCursorAdapter

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/cursoradapter/widget/ResourceCursorAdapter "View this page in Java")

<br />

```
abstract class ResourceCursorAdapter : CursorAdapter
```

<br />

|---|---|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                                                 ||||
| ↳ | [android.widget.BaseAdapter](https://developer.android.com/reference/android/widget/BaseAdapter.html)                                                           |||
|   | ↳ | [androidx.cursoradapter.widget.CursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter)                    ||
|   |   | ↳ | [androidx.cursoradapter.widget.ResourceCursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter) |

Known direct subclasses  
[SimpleCursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/SimpleCursorAdapter)  

|-------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SimpleCursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/SimpleCursorAdapter) | Static library support version of the framework's[android.widget.SimpleCursorAdapter](https://developer.android.com/reference/android/widget/SimpleCursorAdapter.html). |

*** ** * ** ***

Static library support version of the framework's[android.widget.ResourceCursorAdapter](https://developer.android.com/reference/android/widget/ResourceCursorAdapter.html). Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework SDK documentation for a class overview.

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                ### Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ~~[ResourceCursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,int,android.database.Cursor))~~`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, layout: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, c: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!)` **This function is deprecated.** This option is discouraged, as it results in Cursor queries being performed on the application's UI thread and thus can cause poor responsiveness or even Application Not Responding errors. <br />                                                                                                                           |
| ~~[ResourceCursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,int,android.database.Cursor,boolean))~~`(` ` context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!,` ` layout: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` c: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!,` ` autoRequery: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) `)` **This function is deprecated.** This option is discouraged, as it results in Cursor queries being performed on the application's UI thread and thus can cause poor responsiveness or even Application Not Responding errors. <br /> |
| [ResourceCursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,int,android.database.Cursor,int))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, layout: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, c: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!, flags: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Standard constructor.                                                                                                                                                                                                                                                    |

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [View](https://developer.android.com/reference/android/view/View.html)`!`     | [newDropDownView](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter#newDropDownView(android.content.Context,android.database.Cursor,android.view.ViewGroup))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, cursor: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!, parent: `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)`!)` Makes a new drop down view to hold the data pointed to by cursor. |
| [View](https://developer.android.com/reference/android/view/View.html)`!`     | [newView](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter#newView(android.content.Context,android.database.Cursor,android.view.ViewGroup))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, cursor: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!, parent: `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)`!)` Inflates view(s) from the specified XML file.                                     |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [setDropDownViewResource](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter#setDropDownViewResource(int))`(dropDownLayout: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Sets the layout resource of the drop down views.                                                                                                                                                                                                                                                           |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [setViewResource](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter#setViewResource(int))`(layout: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Sets the layout resource of the item views.                                                                                                                                                                                                                                                                                        |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ### Inherited Constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[android.widget.Adapter](https://developer.android.com/reference/android/widget/Adapter.html) |-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------| | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [IGNORE_ITEM_VIEW_TYPE](https://developer.android.com/reference/android/widget/Adapter.html#IGNORE_ITEM_VIEW_TYPE())` = -1` | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [NO_SELECTION](https://developer.android.com/reference/android/widget/Adapter.html#NO_SELECTION())` = -2147483648`          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| From[androidx.cursoradapter.widget.CursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter) |-------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FLAG_AUTO_REQUERY](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#FLAG_AUTO_REQUERY())` = 1` **This property is deprecated.** This option is discouraged, as it results in Cursor queries being performed on the application's UI thread and thus can cause poor responsiveness or even Application Not Responding errors. <br />                                    | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FLAG_REGISTER_CONTENT_OBSERVER](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#FLAG_REGISTER_CONTENT_OBSERVER())` = 2` If set the adapter will register a content observer on the cursor and will call[onContentChanged](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#onContentChanged())when a notification comes in. | |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[android.widget.Adapter](https://developer.android.com/reference/android/widget/Adapter.html) |-------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `abstract `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)    | [getCount](https://developer.android.com/reference/android/widget/Adapter.html#getCount())`()`                                                                                                                                                                                                                                                                                                     | | `abstract `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`!` | [getItem](https://developer.android.com/reference/android/widget/Adapter.html#getItem(int))`(p: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                    | | `abstract `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)  | [getItemId](https://developer.android.com/reference/android/widget/Adapter.html#getItemId(int))`(p: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                | | `abstract `[View](https://developer.android.com/reference/android/view/View.html)`!`      | [getView](https://developer.android.com/reference/android/widget/Adapter.html#getView(int, android.view.View, android.view.ViewGroup))`(p: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, p1: `[View](https://developer.android.com/reference/android/view/View.html)`!, p2: `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)`!)` |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| From[android.widget.BaseAdapter](https://developer.android.com/reference/android/widget/BaseAdapter.html) |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                   | [areAllItemsEnabled](https://developer.android.com/reference/android/widget/BaseAdapter.html#areAllItemsEnabled())`()`                                                                                                                                                                                                                                                                                                                     | | [Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`!>!` | [getAutofillOptions](https://developer.android.com/reference/android/widget/BaseAdapter.html#getAutofillOptions())`()`                                                                                                                                                                                                                                                                                                                     | | [View](https://developer.android.com/reference/android/view/View.html)`!`                                                                                                             | [getDropDownView](https://developer.android.com/reference/android/widget/BaseAdapter.html#getDropDownView(int, android.view.View, android.view.ViewGroup))`(position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, convertView: `[View](https://developer.android.com/reference/android/view/View.html)`!, parent: `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)`!)` | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                           | [getItemViewType](https://developer.android.com/reference/android/widget/BaseAdapter.html#getItemViewType(int))`(position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                                 | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                           | [getViewTypeCount](https://developer.android.com/reference/android/widget/BaseAdapter.html#getViewTypeCount())`()`                                                                                                                                                                                                                                                                                                                         | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                   | [hasStableIds](https://developer.android.com/reference/android/widget/BaseAdapter.html#hasStableIds())`()`                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                   | [isEmpty](https://developer.android.com/reference/android/widget/BaseAdapter.html#isEmpty())`()`                                                                                                                                                                                                                                                                                                                                           | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                   | [isEnabled](https://developer.android.com/reference/android/widget/BaseAdapter.html#isEnabled(int))`(position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                         | [notifyDataSetChanged](https://developer.android.com/reference/android/widget/BaseAdapter.html#notifyDataSetChanged())`()`                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                         | [notifyDataSetInvalidated](https://developer.android.com/reference/android/widget/BaseAdapter.html#notifyDataSetInvalidated())`()`                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                         | [registerDataSetObserver](https://developer.android.com/reference/android/widget/BaseAdapter.html#registerDataSetObserver(android.database.DataSetObserver))`(observer: `[DataSetObserver](https://developer.android.com/reference/android/database/DataSetObserver.html)`!)`                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                         | [setAutofillOptions](https://developer.android.com/reference/android/widget/BaseAdapter.html#setAutofillOptions(java.lang.CharSequence...))`(options: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`!>!)`                                                                                              | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                         | [unregisterDataSetObserver](https://developer.android.com/reference/android/widget/BaseAdapter.html#unregisterDataSetObserver(android.database.DataSetObserver))`(observer: `[DataSetObserver](https://developer.android.com/reference/android/database/DataSetObserver.html)`!)`                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| From[androidx.cursoradapter.widget.CursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter) |-----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `abstract `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [bindView](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#bindView(android.view.View,android.content.Context,android.database.Cursor))`(view: `[View](https://developer.android.com/reference/android/view/View.html)`!, context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, cursor: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!)` Bind an existing view to the data pointed to by cursor                              | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [changeCursor](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#changeCursor(android.database.Cursor))`(cursor: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!)` Change the underlying cursor to a new cursor.                                                                                                                                                                                                                                                       | | [CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`!`         | [convertToString](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#convertToString(android.database.Cursor))`(cursor: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!)` Converts the cursor into a CharSequence.                                                                                                                                                                                                                                                      | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                               | [getCount](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#getCount())`()`                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!`                         | [getCursor](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#getCursor())`()` Returns the cursor.                                                                                                                                                                                                                                                                                                                                                                                                       | | [View](https://developer.android.com/reference/android/view/View.html)`!`                                 | [getDropDownView](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#getDropDownView(int,android.view.View,android.view.ViewGroup))`(position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, convertView: `[View](https://developer.android.com/reference/android/view/View.html)`!, parent: `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)`!)`                                                                                       | | [Filter](https://developer.android.com/reference/android/widget/Filter.html)`!`                           | [getFilter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#getFilter())`()`                                                                                                                                                                                                                                                                                                                                                                                                                           | | [FilterQueryProvider](https://developer.android.com/reference/android/widget/FilterQueryProvider.html)`!` | [getFilterQueryProvider](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#getFilterQueryProvider())`()` Returns the query filter provider used for filtering.                                                                                                                                                                                                                                                                                                                                           | | [Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`!`                            | [getItem](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#getItem(int))`(position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                                                                                                                                     | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                             | [getItemId](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#getItemId(int))`(position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                                                                                                                                 | | [View](https://developer.android.com/reference/android/view/View.html)`!`                                 | [getView](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#getView(int,android.view.View,android.view.ViewGroup))`(position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, convertView: `[View](https://developer.android.com/reference/android/view/View.html)`!, parent: `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)`!)`                                                                                                       | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                       | [hasStableIds](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#hasStableIds())`()`                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | ~~[init](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#init(android.content.Context,android.database.Cursor,boolean))~~`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, c: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!, autoRequery: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` **This function is deprecated.** Don't use this, use the normal constructor. <br /> | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [onContentChanged](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#onContentChanged())`()` Called when the[ContentObserver](https://developer.android.com/reference/android/database/ContentObserver.html)on the cursor receives a change notification.                                                                                                                                                                                                                                                | | [Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!`                         | [runQueryOnBackgroundThread](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#runQueryOnBackgroundThread(java.lang.CharSequence))`(constraint: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`!)` Runs a query with the specified constraint.                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [setFilterQueryProvider](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#setFilterQueryProvider(android.widget.FilterQueryProvider))`(filterQueryProvider: `[FilterQueryProvider](https://developer.android.com/reference/android/widget/FilterQueryProvider.html)`!)` Sets the query filter provider used to filter the current Cursor.                                                                                                                                                               | | [Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!`                         | [swapCursor](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#swapCursor(android.database.Cursor))`(newCursor: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!)` Swap in a new Cursor, returning the old Cursor.                                                                                                                                                                                                                                                      | |
| From[android.widget.Filterable](https://developer.android.com/reference/android/widget/Filterable.html) |--------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------| | `abstract `[Filter](https://developer.android.com/reference/android/widget/Filter.html)`!` | [getFilter](https://developer.android.com/reference/android/widget/Filterable.html#getFilter())`()` |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

## Public constructors

### ResourceCursorAdapter

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

```
[ResourceCursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,int,android.database.Cursor))(context: Context!, layout: Int, c: Cursor!)
```
| **This function is deprecated.**   
|
| This option is discouraged, as it results in Cursor queries being performed on the application's UI thread and thus can cause poor responsiveness or even Application Not Responding errors. As an alternative, use[android.app.LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html)with a[android.content.CursorLoader](https://developer.android.com/reference/android/content/CursorLoader.html).

Constructor the enables auto-requery.  

|                                          Parameters                                           |
|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!` | The context where the ListView associated with this adapter is running                                                                                                        |
| `layout: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | resource identifier of a layout file that defines the views for this list item. Unless you override them later, this will define both the item views and the drop down views. |

### ResourceCursorAdapter

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

```
[ResourceCursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,int,android.database.Cursor,boolean))(
    context: Context!,
    layout: Int,
    c: Cursor!,
    autoRequery: Boolean
)
```
| **This function is deprecated.**   
|
| This option is discouraged, as it results in Cursor queries being performed on the application's UI thread and thus can cause poor responsiveness or even Application Not Responding errors. As an alternative, use[android.app.LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html)with a[android.content.CursorLoader](https://developer.android.com/reference/android/content/CursorLoader.html).

Constructor with default behavior as per[CursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#CursorAdapter(android.content.Context,android.database.Cursor,boolean)); it is recommended you not use this, but instead[ResourceCursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,int,android.database.Cursor,int)). When using this constructor,[FLAG_REGISTER_CONTENT_OBSERVER](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#FLAG_REGISTER_CONTENT_OBSERVER())will always be set.  

|                                             Parameters                                             |
|----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!`      | The context where the ListView associated with this adapter is running                                                                                                        |
| `layout: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)              | resource identifier of a layout file that defines the views for this list item. Unless you override them later, this will define both the item views and the drop down views. |
| `c: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!`             | The cursor from which to get the data.                                                                                                                                        |
| `autoRequery: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | If true the adapter will call requery() on the cursor whenever it changes so the most recent data is always displayed. Using true here is discouraged.                        |

### ResourceCursorAdapter

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

```
ResourceCursorAdapter(context: Context!, layout: Int, c: Cursor!, flags: Int)
```

Standard constructor.  

|                                          Parameters                                           |
|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!` | The context where the ListView associated with this adapter is running                                                                                                                                                                     |
| `layout: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | Resource identifier of a layout file that defines the views for this list item. Unless you override them later, this will define both the item views and the drop down views.                                                              |
| `c: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!`        | The cursor from which to get the data.                                                                                                                                                                                                     |
| `flags: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | Flags used to determine the behavior of the adapter, as per[CursorAdapter](https://developer.android.com/reference/kotlin/androidx/cursoradapter/widget/CursorAdapter#CursorAdapter(android.content.Context,android.database.Cursor,int)). |

## Public functions

### newDropDownView

```
fun newDropDownView(context: Context!, cursor: Cursor!, parent: ViewGroup!): View!
```

Makes a new drop down view to hold the data pointed to by cursor.  

|                                          Parameters                                           |
|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!` | Interface to application's global information                                               |
| `cursor: `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)`!`   | The cursor from which to get the data. The cursor is already moved to the correct position. |
| `parent: `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)`!` | The parent to which the new view is attached to                                             |

|                                  Returns                                  |
|---------------------------------------------------------------------------|-------------------------|
| [View](https://developer.android.com/reference/android/view/View.html)`!` | the newly created view. |

### newView

Added in[1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/cursoradapter#1.1.0-alpha01)  

```
fun newView(context: Context!, cursor: Cursor!, parent: ViewGroup!): View!
```

Inflates view(s) from the specified XML file.  

|                                                                                See also                                                                                |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [newView](https://developer.android.com/reference/android/widget/CursorAdapter.html#newView(android.content.Context, android.database.Cursor, android.view.ViewGroup)) |   |

### setDropDownViewResource

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

```
fun setDropDownViewResource(dropDownLayout: Int): Unit
```

Sets the layout resource of the drop down views.  

|                                          Parameters                                           |
|-----------------------------------------------------------------------------------------------|-----------------------------------------------------|
| `dropDownLayout: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the layout resources used to create drop down views |

### setViewResource

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

```
fun setViewResource(layout: Int): Unit
```

Sets the layout resource of the item views.  

|                                      Parameters                                       |
|---------------------------------------------------------------------------------------|------------------------------------------------|
| `layout: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the layout resources used to create item views |