# ResourceCursorAdapter

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:cursoradapter:28.0.0-alpha1  
Summary:[Inherited Constants](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#inhconstants)\|[Ctors](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)  

# ResourceCursorAdapter

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


abstract
class
ResourceCursorAdapter
`  
`


``


``

extends `[CursorAdapter](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter)`


``


`

|---|---|---|-------------------------------------------------|
| java.lang.Object                                         ||||
| ↳ | [android.widget.BaseAdapter](https://developer.android.com/reference/android/widget/BaseAdapter.html) |||
|   | ↳ | [android.support.v4.widget.CursorAdapter](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter) ||
|   |   | ↳ | android.support.v4.widget.ResourceCursorAdapter |

|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)Known Direct Subclasses [SimpleCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter) |--------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| | [SimpleCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter) | Static library support version of the framework's[SimpleCursorAdapter](https://developer.android.com/reference/android/widget/SimpleCursorAdapter.html). | |

<br />

*** ** * ** ***

Static library support version of the framework's[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

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)From class` `[android.support.v4.widget.CursorAdapter](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter)` ` |-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `int` | [FLAG_AUTO_REQUERY](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#FLAG_AUTO_REQUERY) *This constant was deprecated in API level 22.1.0. 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[LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html)with a[CursorLoader](https://developer.android.com/reference/android/content/CursorLoader.html).* | | `int` | [FLAG_REGISTER_CONTENT_OBSERVER](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#FLAG_REGISTER_CONTENT_OBSERVER) If set the adapter will register a content observer on the cursor and will call[onContentChanged()](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#onContentChanged())when a notification comes in.                                                                                                                                                                                                 | |
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)From interface` android.widget.Adapter ` |-------|--------------------------------| | `int` | `IGNORE_ITEM_VIEW_TYPE` <br /> | | `int` | `NO_SELECTION` <br />          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

|                                                                                                                                                                                                                                                                                                                                                                                                                                      ### Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                                      ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[ResourceCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context, int, android.database.Cursor))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, int layout, `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` c) ` *This constructor was deprecated in API level 22.1.0. 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[LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html)with a[CursorLoader](https://developer.android.com/reference/android/content/CursorLoader.html).*                               |
| ` `[ResourceCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, boolean))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, int layout, `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` c, boolean autoRequery) ` *This constructor was deprecated in API level 24.1.0. 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[LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html)with a[CursorLoader](https://developer.android.com/reference/android/content/CursorLoader.html).* |
| ` `[ResourceCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, int))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, int layout, `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` c, int flags) ` Standard constructor.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

|                                                                                                                                                                                                                                                                                                           ### Public methods                                                                                                                                                                                                                                                                                                           ||
|---------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[View](https://developer.android.com/reference/android/view/View.html) | ` `[newDropDownView](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#newDropDownView(android.content.Context, android.database.Cursor, android.view.ViewGroup))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` cursor, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` parent) ` 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/android/support/v4/widget/ResourceCursorAdapter#newView(android.content.Context, android.database.Cursor, android.view.ViewGroup))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` cursor, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` parent) ` Inflates view(s) from the specified XML file.                                     |
| ` void`                                                                   | ` `[setDropDownViewResource](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#setDropDownViewResource(int))`(int dropDownLayout) ` <br /> Sets the layout resource of the drop down views.                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                   | ` `[setViewResource](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#setViewResource(int))`(int layout) ` <br /> Sets the layout resource of the item views.                                                                                                                                                                                                                                                                                                                                                        |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)From class` `[android.support.v4.widget.CursorAdapter](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter)` ` |-----------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void`                                                                                          | ` `[bindView](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#bindView(android.view.View, android.content.Context, android.database.Cursor))`(`[View](https://developer.android.com/reference/android/view/View.html)` view, `[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` cursor) ` Bind an existing view to the data pointed to by cursor                                           | | ` void`                                                                                                   | ` `[changeCursor](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#changeCursor(android.database.Cursor))`(`[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` cursor) ` Change the underlying cursor to a new cursor.                                                                                                                                                                                                                                                                  | | ` CharSequence`                                                                                           | ` `[convertToString](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#convertToString(android.database.Cursor))`(`[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` cursor) ` <br /> Converts the cursor into a CharSequence.                                                                                                                                                                                                                                                          | | ` int`                                                                                                    | ` `[getCount](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#getCount())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)                         | ` `[getCursor](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#getCursor())`() ` Returns the cursor.                                                                                                                                                                                                                                                                                                                                                                                                                | | ` `[View](https://developer.android.com/reference/android/view/View.html)                                 | ` `[getDropDownView](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#getDropDownView(int, android.view.View, android.view.ViewGroup))`(int position, `[View](https://developer.android.com/reference/android/view/View.html)` convertView, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` parent) `                                                                                                                                                                             | | ` `[Filter](https://developer.android.com/reference/android/widget/Filter.html)                           | ` `[getFilter](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#getFilter())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                    | | ` `[FilterQueryProvider](https://developer.android.com/reference/android/widget/FilterQueryProvider.html) | ` `[getFilterQueryProvider](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#getFilterQueryProvider())`() ` Returns the query filter provider used for filtering.                                                                                                                                                                                                                                                                                                                                                    | | ` Object`                                                                                                 | ` `[getItem](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#getItem(int))`(int position) `                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` long`                                                                                                   | ` `[getItemId](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#getItemId(int))`(int position) `                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` `[View](https://developer.android.com/reference/android/view/View.html)                                 | ` `[getView](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#getView(int, android.view.View, android.view.ViewGroup))`(int position, `[View](https://developer.android.com/reference/android/view/View.html)` convertView, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` parent) `                                                                                                                                                                                             | | ` boolean`                                                                                                | ` `[hasStableIds](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#hasStableIds())`() `                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                                   | ` `[init](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#init(android.content.Context, android.database.Cursor, boolean))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` c, boolean autoRequery) ` *This method was deprecated in API level 22.1.0. Don't use this, use the normal constructor. This will be removed in the future.*                                                 | | ` `[View](https://developer.android.com/reference/android/view/View.html)                                 | ` `[newDropDownView](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#newDropDownView(android.content.Context, android.database.Cursor, android.view.ViewGroup))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` cursor, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` parent) ` Makes a new drop down view to hold the data pointed to by cursor. | | ` abstract `[View](https://developer.android.com/reference/android/view/View.html)                        | ` `[newView](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#newView(android.content.Context, android.database.Cursor, android.view.ViewGroup))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context, `[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` cursor, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` parent) ` Makes a new view to hold the data pointed to by cursor.                           | | ` void`                                                                                                   | ` `[onContentChanged](https://developer.android.com/reference/android/support/v4/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/android/support/v4/widget/CursorAdapter#runQueryOnBackgroundThread(java.lang.CharSequence))`(CharSequence constraint) ` Runs a query with the specified constraint.                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                                   | ` `[setFilterQueryProvider](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#setFilterQueryProvider(android.widget.FilterQueryProvider))`(`[FilterQueryProvider](https://developer.android.com/reference/android/widget/FilterQueryProvider.html)` filterQueryProvider) ` 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/android/support/v4/widget/CursorAdapter#swapCursor(android.database.Cursor))`(`[Cursor](https://developer.android.com/reference/android/database/Cursor.html)` newCursor) ` Swap in a new Cursor, returning the old Cursor.                                                                                                                                                                                                                                                                 | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)From class` `[android.widget.BaseAdapter](https://developer.android.com/reference/android/widget/BaseAdapter.html)` ` |---------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` boolean`                                                                | ` areAllItemsEnabled() `                                                                                                                                                                              | | ` CharSequence[]`                                                         | ` getAutofillOptions() `                                                                                                                                                                              | | ` `[View](https://developer.android.com/reference/android/view/View.html) | ` getDropDownView(int arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` arg2) ` | | ` int`                                                                    | ` getItemViewType(int arg0) `                                                                                                                                                                         | | ` int`                                                                    | ` getViewTypeCount() `                                                                                                                                                                                | | ` boolean`                                                                | ` hasStableIds() `                                                                                                                                                                                    | | ` boolean`                                                                | ` isEmpty() `                                                                                                                                                                                         | | ` boolean`                                                                | ` isEnabled(int arg0) `                                                                                                                                                                               | | ` void`                                                                   | ` notifyDataSetChanged() `                                                                                                                                                                            | | ` void`                                                                   | ` notifyDataSetInvalidated() `                                                                                                                                                                        | | ` void`                                                                   | ` registerDataSetObserver(`[DataSetObserver](https://developer.android.com/reference/android/database/DataSetObserver.html)` arg0) `                                                                  | | ` void`                                                                   | ` setAutofillOptions(CharSequence... arg0) `                                                                                                                                                          | | ` void`                                                                   | ` unregisterDataSetObserver(`[DataSetObserver](https://developer.android.com/reference/android/database/DataSetObserver.html)` arg0) `                                                                | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)From interface` `[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/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)From interface` `[android.widget.ListAdapter](https://developer.android.com/reference/android/widget/ListAdapter.html)` ` |---------------------|--------------------------| | ` abstract boolean` | ` areAllItemsEnabled() ` | | ` abstract boolean` | ` isEnabled(int arg0) `  | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)From interface` `[android.widget.SpinnerAdapter](https://developer.android.com/reference/android/widget/SpinnerAdapter.html)` ` |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[View](https://developer.android.com/reference/android/view/View.html) | ` getDropDownView(int arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` arg2) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter#)From interface` `[android.widget.Adapter](https://developer.android.com/reference/android/widget/Adapter.html)` ` |------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` default CharSequence[]`                                                          | ` getAutofillOptions() `                                                                                                                                                                      | | ` abstract int`                                                                    | ` getCount() `                                                                                                                                                                                | | ` abstract Object`                                                                 | ` getItem(int arg0) `                                                                                                                                                                         | | ` abstract long`                                                                   | ` getItemId(int arg0) `                                                                                                                                                                       | | ` abstract int`                                                                    | ` getItemViewType(int arg0) `                                                                                                                                                                 | | ` abstract `[View](https://developer.android.com/reference/android/view/View.html) | ` getView(int arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` arg2) ` | | ` abstract int`                                                                    | ` getViewTypeCount() `                                                                                                                                                                        | | ` abstract boolean`                                                                | ` hasStableIds() `                                                                                                                                                                            | | ` abstract boolean`                                                                | ` isEmpty() `                                                                                                                                                                                 | | ` abstract void`                                                                   | ` registerDataSetObserver(`[DataSetObserver](https://developer.android.com/reference/android/database/DataSetObserver.html)` arg0) `                                                          | | ` abstract void`                                                                   | ` unregisterDataSetObserver(`[DataSetObserver](https://developer.android.com/reference/android/database/DataSetObserver.html)` arg0) `                                                        | ||

## Public constructors

### ResourceCursorAdapter

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ResourceCursorAdapter (Context context, 
                int layout, 
                Cursor c)
```

<br />

**This constructor was deprecated in API level 22.1.0.**   
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[LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html)with a[CursorLoader](https://developer.android.com/reference/android/content/CursorLoader.html).

Constructor the enables auto-requery.

<br />

|                                                                                               Parameters                                                                                               ||
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context` | `Context`: The context where the ListView associated with this adapter is running <br />                                                                                                    |
| `layout`  | `int`: 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. <br /> |
| `c`       | `Cursor` <br />                                                                                                                                                                             |

### ResourceCursorAdapter

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ResourceCursorAdapter (Context context, 
                int layout, 
                Cursor c, 
                boolean autoRequery)
```

<br />

**This constructor was deprecated in API level 24.1.0.**   
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[LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html)with a[CursorLoader](https://developer.android.com/reference/android/content/CursorLoader.html).

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

<br />

|                                                                                                 Parameters                                                                                                 ||
|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`     | `Context`: The context where the ListView associated with this adapter is running <br />                                                                                                    |
| `layout`      | `int`: 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. <br /> |
| `c`           | `Cursor`: The cursor from which to get the data. <br />                                                                                                                                     |
| `autoRequery` | `boolean`: 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. <br />                    |

### ResourceCursorAdapter

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ResourceCursorAdapter (Context context, 
                int layout, 
                Cursor c, 
                int flags)
```

Standard constructor.

<br />

|                                                                                                                                    Parameters                                                                                                                                    ||
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context` | `Context`: The context where the ListView associated with this adapter is running <br />                                                                                                                                                                              |
| `layout`  | `int`: 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. <br />                                                                           |
| `c`       | `Cursor`: The cursor from which to get the data. <br />                                                                                                                                                                                                               |
| `flags`   | `int`: Flags used to determine the behavior of the adapter, as per[CursorAdapter(Context, Cursor, int)](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter#CursorAdapter(android.content.Context, android.database.Cursor, int)). <br /> |

## Public methods

### newDropDownView

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

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

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

<br />

|                                                       Parameters                                                        ||
|-----------|--------------------------------------------------------------------------------------------------------------|
| `context` | `Context`: Interface to application's global information <br />                                              |
| `cursor`  | `Cursor`: The cursor from which to get the data. The cursor is already moved to the correct position. <br /> |
| `parent`  | `ViewGroup`: The parent to which the new view is attached to <br />                                          |

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

### newView

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

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

Inflates view(s) from the specified XML file.

<br />

|                                                       Parameters                                                        ||
|-----------|--------------------------------------------------------------------------------------------------------------|
| `context` | `Context`: Interface to application's global information <br />                                              |
| `cursor`  | `Cursor`: The cursor from which to get the data. The cursor is already moved to the correct position. <br /> |
| `parent`  | `ViewGroup`: The parent to which the new view is attached to <br />                                          |

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

**See also:**

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

### setDropDownViewResource

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDropDownViewResource (int dropDownLayout)
```

<br />

Sets the layout resource of the drop down views.

<br />

<br />

|                                     Parameters                                      ||
|------------------|-------------------------------------------------------------------|
| `dropDownLayout` | `int`: the layout resources used to create drop down views <br /> |

### setViewResource

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setViewResource (int layout)
```

<br />

Sets the layout resource of the item views.

<br />

<br />

|                               Parameters                               ||
|----------|--------------------------------------------------------------|
| `layout` | `int`: the layout resources used to create item views <br /> |

-

  ## Interfaces

  - [DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)
  - [NestedScrollView.OnScrollChangeListener](https://developer.android.com/reference/android/support/v4/widget/NestedScrollView.OnScrollChangeListener)
  - [SimpleCursorAdapter.CursorToStringConverter](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter.CursorToStringConverter)
  - [SimpleCursorAdapter.ViewBinder](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter.ViewBinder)
  - [SlidingPaneLayout.PanelSlideListener](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.PanelSlideListener)
  - [SwipeRefreshLayout.OnChildScrollUpCallback](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.OnChildScrollUpCallback)
  - [SwipeRefreshLayout.OnRefreshListener](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.OnRefreshListener)
  - [TintableCompoundButton](https://developer.android.com/reference/android/support/v4/widget/TintableCompoundButton)
-

  ## Classes

  - [AutoScrollHelper](https://developer.android.com/reference/android/support/v4/widget/AutoScrollHelper)
  - [CircularProgressDrawable](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable)
  - [CompoundButtonCompat](https://developer.android.com/reference/android/support/v4/widget/CompoundButtonCompat)
  - [ContentLoadingProgressBar](https://developer.android.com/reference/android/support/v4/widget/ContentLoadingProgressBar)
  - [CursorAdapter](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter)
  - [DrawerLayout](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout)
  - [DrawerLayout.LayoutParams](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.LayoutParams)
  - [DrawerLayout.SavedState](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.SavedState)
  - [DrawerLayout.SimpleDrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.SimpleDrawerListener)
  - [EdgeEffectCompat](https://developer.android.com/reference/android/support/v4/widget/EdgeEffectCompat)
  - [ExploreByTouchHelper](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper)
  - [ImageViewCompat](https://developer.android.com/reference/android/support/v4/widget/ImageViewCompat)
  - [ListPopupWindowCompat](https://developer.android.com/reference/android/support/v4/widget/ListPopupWindowCompat)
  - [ListViewAutoScrollHelper](https://developer.android.com/reference/android/support/v4/widget/ListViewAutoScrollHelper)
  - [ListViewCompat](https://developer.android.com/reference/android/support/v4/widget/ListViewCompat)
  - [NestedScrollView](https://developer.android.com/reference/android/support/v4/widget/NestedScrollView)
  - [PopupMenuCompat](https://developer.android.com/reference/android/support/v4/widget/PopupMenuCompat)
  - [PopupWindowCompat](https://developer.android.com/reference/android/support/v4/widget/PopupWindowCompat)
  - [ResourceCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter)
  - [ScrollerCompat](https://developer.android.com/reference/android/support/v4/widget/ScrollerCompat)
  - [SimpleCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter)
  - [SlidingPaneLayout](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout)
  - [SlidingPaneLayout.LayoutParams](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.LayoutParams)
  - [SlidingPaneLayout.SimplePanelSlideListener](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.SimplePanelSlideListener)
  - [Space](https://developer.android.com/reference/android/support/v4/widget/Space)
  - [SwipeRefreshLayout](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout)
  - [TextViewCompat](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat)
  - [ViewDragHelper](https://developer.android.com/reference/android/support/v4/widget/ViewDragHelper)
  - [ViewDragHelper.Callback](https://developer.android.com/reference/android/support/v4/widget/ViewDragHelper.Callback)