Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Inherited Constants](https://developer.android.com/reference/android/widget/ResourceCursorAdapter#inhconstants) \| [Ctors](https://developer.android.com/reference/android/widget/ResourceCursorAdapter#pubctors) \| [Methods](https://developer.android.com/reference/android/widget/ResourceCursorAdapter#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/widget/ResourceCursorAdapter#inhmethods)

# ResourceCursorAdapter

*** ** * ** ***

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


`
public


abstract
class
ResourceCursorAdapter
`


`


`

`


`

`

extends https://developer.android.com/reference/android/widget/CursorAdapter


`

`


`

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

|---|
| Known direct subclasses [SimpleCursorAdapter](https://developer.android.com/reference/android/widget/SimpleCursorAdapter) |---|---| | [SimpleCursorAdapter](https://developer.android.com/reference/android/widget/SimpleCursorAdapter) | An easy adapter to map columns from a cursor to TextViews or ImageViews defined in an XML file. | |

<br />

*** ** * ** ***

An easy adapter that creates views defined in an XML file. You can specify
the XML file that defines the appearance of the views.

## Summary

| ### Inherited constants |
|---|
| From class `https://developer.android.com/reference/android/widget/CursorAdapter` |---|---| | `int` | `https://developer.android.com/reference/android/widget/CursorAdapter#FLAG_AUTO_REQUERY` *This constant was deprecated in API level 15. 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 `https://developer.android.com/reference/android/app/LoaderManager` with a `https://developer.android.com/reference/android/content/CursorLoader`.* | | `int` | `https://developer.android.com/reference/android/widget/CursorAdapter#FLAG_REGISTER_CONTENT_OBSERVER` If set the adapter will register a content observer on the cursor and will call `https://developer.android.com/reference/android/widget/CursorAdapter#onContentChanged()` when a notification comes in. | |
| From interface `https://developer.android.com/reference/android/widget/Adapter` |---|---| | `int` | `https://developer.android.com/reference/android/widget/Adapter#IGNORE_ITEM_VIEW_TYPE` An item view type that causes the `https://developer.android.com/reference/android/widget/AdapterView` to ignore the item view. | | `int` | `https://developer.android.com/reference/android/widget/Adapter#NO_SELECTION` | |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,%20int,%20android.database.Cursor)(https://developer.android.com/reference/android/content/Context context, int layout, https://developer.android.com/reference/android/database/Cursor c) ` *This constructor 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 `https://developer.android.com/reference/android/app/LoaderManager` with a `https://developer.android.com/reference/android/content/CursorLoader`.* |
| ` https://developer.android.com/reference/android/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,%20int,%20android.database.Cursor,%20boolean)(https://developer.android.com/reference/android/content/Context context, int layout, https://developer.android.com/reference/android/database/Cursor c, boolean autoRequery) ` Constructor with default behavior as per `https://developer.android.com/reference/android/widget/CursorAdapter#CursorAdapter(android.content.Context,%20android.database.Cursor,%20boolean)`; it is recommended you not use this, but instead `https://developer.android.com/reference/android/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,%20int,%20android.database.Cursor,%20int)`. |
| ` https://developer.android.com/reference/android/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,%20int,%20android.database.Cursor,%20int)(https://developer.android.com/reference/android/content/Context context, int layout, https://developer.android.com/reference/android/database/Cursor c, int flags) ` Standard constructor. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/widget/ResourceCursorAdapter#newDropDownView(android.content.Context,%20android.database.Cursor,%20android.view.ViewGroup)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/database/Cursor cursor, https://developer.android.com/reference/android/view/ViewGroup parent) ` Makes a new drop down view to hold the data pointed to by cursor. |
| ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/widget/ResourceCursorAdapter#newView(android.content.Context,%20android.database.Cursor,%20android.view.ViewGroup)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/database/Cursor cursor, https://developer.android.com/reference/android/view/ViewGroup parent) ` Inflates view(s) from the specified XML file. |
| ` void` | ` https://developer.android.com/reference/android/widget/ResourceCursorAdapter#setDropDownViewResource(int)(int dropDownLayout) ` <br /> Sets the layout resource of the drop down views. |
| ` void` | ` https://developer.android.com/reference/android/widget/ResourceCursorAdapter#setDropDownViewTheme(android.content.res.Resources.Theme)(https://developer.android.com/reference/android/content/res/Resources.Theme theme) ` Sets the `https://developer.android.com/reference/android/content/res/Resources.Theme` against which drop-down views are inflated. |
| ` void` | ` https://developer.android.com/reference/android/widget/ResourceCursorAdapter#setViewResource(int)(int layout) ` <br /> Sets the layout resource of the item views. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/android/widget/CursorAdapter ` |---|---| | ` abstract void` | ` https://developer.android.com/reference/android/widget/CursorAdapter#bindView(android.view.View,%20android.content.Context,%20android.database.Cursor)(https://developer.android.com/reference/android/view/View view, https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/database/Cursor cursor) ` Bind an existing view to the data pointed to by cursor | | ` void` | ` https://developer.android.com/reference/android/widget/CursorAdapter#changeCursor(android.database.Cursor)(https://developer.android.com/reference/android/database/Cursor cursor) ` Change the underlying cursor to a new cursor. | | ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/widget/CursorAdapter#convertToString(android.database.Cursor)(https://developer.android.com/reference/android/database/Cursor cursor) ` <br /> Converts the cursor into a CharSequence. | | ` int` | ` https://developer.android.com/reference/android/widget/CursorAdapter#getCount()() ` How many items are in the data set represented by this Adapter. | | ` https://developer.android.com/reference/android/database/Cursor` | ` https://developer.android.com/reference/android/widget/CursorAdapter#getCursor()() ` Returns the cursor. | | ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/widget/CursorAdapter#getDropDownView(int,%20android.view.View,%20android.view.ViewGroup)(int position, https://developer.android.com/reference/android/view/View convertView, https://developer.android.com/reference/android/view/ViewGroup parent) ` Gets a `https://developer.android.com/reference/android/view/View` that displays in the drop down popup the data at the specified position in the data set. | | ` https://developer.android.com/reference/android/content/res/Resources.Theme` | ` https://developer.android.com/reference/android/widget/CursorAdapter#getDropDownViewTheme()() ` Returns the value previously set by a call to `https://developer.android.com/reference/android/widget/ThemedSpinnerAdapter#setDropDownViewTheme(android.content.res.Resources.Theme)`. | | ` https://developer.android.com/reference/android/widget/Filter` | ` https://developer.android.com/reference/android/widget/CursorAdapter#getFilter()() ` <br /> Returns a filter that can be used to constrain data with a filtering pattern. | | ` https://developer.android.com/reference/android/widget/FilterQueryProvider` | ` https://developer.android.com/reference/android/widget/CursorAdapter#getFilterQueryProvider()() ` Returns the query filter provider used for filtering. | | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/android/widget/CursorAdapter#getItem(int)(int position) ` Get the data item associated with the specified position in the data set. | | ` long` | ` https://developer.android.com/reference/android/widget/CursorAdapter#getItemId(int)(int position) ` Get the row id associated with the specified position in the list. | | ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/widget/CursorAdapter#getView(int,%20android.view.View,%20android.view.ViewGroup)(int position, https://developer.android.com/reference/android/view/View convertView, https://developer.android.com/reference/android/view/ViewGroup parent) ` Get a View that displays the data at the specified position in the data set. | | ` boolean` | ` https://developer.android.com/reference/android/widget/CursorAdapter#hasStableIds()() ` Indicates whether the item ids are stable across changes to the underlying data. | | ` void` | ` https://developer.android.com/reference/android/widget/CursorAdapter#init(android.content.Context,%20android.database.Cursor,%20boolean)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/database/Cursor c, boolean autoRequery) ` *This method was deprecated in API level 15. Don't use this, use the normal constructor. This will be removed in the future.* | | ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/widget/CursorAdapter#newDropDownView(android.content.Context,%20android.database.Cursor,%20android.view.ViewGroup)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/database/Cursor cursor, https://developer.android.com/reference/android/view/ViewGroup parent) ` Makes a new drop down view to hold the data pointed to by cursor. | | ` abstract https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/widget/CursorAdapter#newView(android.content.Context,%20android.database.Cursor,%20android.view.ViewGroup)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/database/Cursor cursor, https://developer.android.com/reference/android/view/ViewGroup parent) ` Makes a new view to hold the data pointed to by cursor. | | ` void` | ` https://developer.android.com/reference/android/widget/CursorAdapter#onContentChanged()() ` Called when the `https://developer.android.com/reference/android/database/ContentObserver` on the cursor receives a change notification. | | ` https://developer.android.com/reference/android/database/Cursor` | ` https://developer.android.com/reference/android/widget/CursorAdapter#runQueryOnBackgroundThread(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence constraint) ` Runs a query with the specified constraint. | | ` void` | ` https://developer.android.com/reference/android/widget/CursorAdapter#setDropDownViewTheme(android.content.res.Resources.Theme)(https://developer.android.com/reference/android/content/res/Resources.Theme theme) ` Sets the `https://developer.android.com/reference/android/content/res/Resources.Theme` against which drop-down views are inflated. | | ` void` | ` https://developer.android.com/reference/android/widget/CursorAdapter#setFilterQueryProvider(android.widget.FilterQueryProvider)(https://developer.android.com/reference/android/widget/FilterQueryProvider filterQueryProvider) ` Sets the query filter provider used to filter the current Cursor. | | ` https://developer.android.com/reference/android/database/Cursor` | ` https://developer.android.com/reference/android/widget/CursorAdapter#swapCursor(android.database.Cursor)(https://developer.android.com/reference/android/database/Cursor newCursor) ` Swap in a new Cursor, returning the old Cursor. | ||
| From class ` https://developer.android.com/reference/android/widget/BaseAdapter ` |---|---| | ` boolean` | ` https://developer.android.com/reference/android/widget/BaseAdapter#areAllItemsEnabled()() ` Indicates whether all the items in this adapter are enabled. | | ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/widget/BaseAdapter#getAutofillOptions()() ` Gets a string representation of the adapter data that can help `https://developer.android.com/reference/android/service/autofill/AutofillService` autofill the view backed by the adapter. | | ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/widget/BaseAdapter#getDropDownView(int,%20android.view.View,%20android.view.ViewGroup)(int position, https://developer.android.com/reference/android/view/View convertView, https://developer.android.com/reference/android/view/ViewGroup parent) ` Gets a `https://developer.android.com/reference/android/view/View` that displays in the drop down popup the data at the specified position in the data set. | | ` int` | ` https://developer.android.com/reference/android/widget/BaseAdapter#getItemViewType(int)(int position) ` Get the type of View that will be created by `https://developer.android.com/reference/android/widget/Adapter#getView(int,%20android.view.View,%20android.view.ViewGroup)` for the specified item. | | ` int` | ` https://developer.android.com/reference/android/widget/BaseAdapter#getViewTypeCount()() ` <br /> Returns the number of types of Views that will be created by `https://developer.android.com/reference/android/widget/Adapter#getView(int,%20android.view.View,%20android.view.ViewGroup)`. | | ` boolean` | ` https://developer.android.com/reference/android/widget/BaseAdapter#hasStableIds()() ` Indicates whether the item ids are stable across changes to the underlying data. | | ` boolean` | ` https://developer.android.com/reference/android/widget/BaseAdapter#isEmpty()() ` | | ` boolean` | ` https://developer.android.com/reference/android/widget/BaseAdapter#isEnabled(int)(int position) ` Returns true if the item at the specified position is not a separator. | | ` void` | ` https://developer.android.com/reference/android/widget/BaseAdapter#notifyDataSetChanged()() ` Notifies the attached observers that the underlying data has been changed and any View reflecting the data set should refresh itself. | | ` void` | ` https://developer.android.com/reference/android/widget/BaseAdapter#notifyDataSetInvalidated()() ` Notifies the attached observers that the underlying data is no longer valid or available. | | ` void` | ` https://developer.android.com/reference/android/widget/BaseAdapter#registerDataSetObserver(android.database.DataSetObserver)(https://developer.android.com/reference/android/database/DataSetObserver observer) ` Register an observer that is called when changes happen to the data used by this adapter. | | ` void` | ` https://developer.android.com/reference/android/widget/BaseAdapter#setAutofillOptions(java.lang.CharSequence[])(https://developer.android.com/reference/java/lang/CharSequence options) ` Sets the value returned by `https://developer.android.com/reference/android/widget/BaseAdapter#getAutofillOptions()` | | ` void` | ` https://developer.android.com/reference/android/widget/BaseAdapter#unregisterDataSetObserver(android.database.DataSetObserver)(https://developer.android.com/reference/android/database/DataSetObserver observer) ` Unregister an observer that has previously been registered with this adapter via `https://developer.android.com/reference/android/widget/Adapter#registerDataSetObserver(android.database.DataSetObserver)`. | ||
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||
| From interface ` https://developer.android.com/reference/android/widget/Filterable ` |---|---| | ` abstract https://developer.android.com/reference/android/widget/Filter` | ` https://developer.android.com/reference/android/widget/Filterable#getFilter()() ` <br /> Returns a filter that can be used to constrain data with a filtering pattern. | ||
| From interface ` https://developer.android.com/reference/android/widget/ThemedSpinnerAdapter ` |---|---| | ` abstract https://developer.android.com/reference/android/content/res/Resources.Theme` | ` https://developer.android.com/reference/android/widget/ThemedSpinnerAdapter#getDropDownViewTheme()() ` Returns the value previously set by a call to `https://developer.android.com/reference/android/widget/ThemedSpinnerAdapter#setDropDownViewTheme(android.content.res.Resources.Theme)`. | | ` abstract void` | ` https://developer.android.com/reference/android/widget/ThemedSpinnerAdapter#setDropDownViewTheme(android.content.res.Resources.Theme)(https://developer.android.com/reference/android/content/res/Resources.Theme theme) ` Sets the `https://developer.android.com/reference/android/content/res/Resources.Theme` against which drop-down views are inflated. | ||
| From interface ` https://developer.android.com/reference/android/widget/ListAdapter ` |---|---| | ` abstract boolean` | ` https://developer.android.com/reference/android/widget/ListAdapter#areAllItemsEnabled()() ` Indicates whether all the items in this adapter are enabled. | | ` abstract boolean` | ` https://developer.android.com/reference/android/widget/ListAdapter#isEnabled(int)(int position) ` Returns true if the item at the specified position is not a separator. | ||
| From interface ` https://developer.android.com/reference/android/widget/SpinnerAdapter ` |---|---| | ` abstract https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/widget/SpinnerAdapter#getDropDownView(int,%20android.view.View,%20android.view.ViewGroup)(int position, https://developer.android.com/reference/android/view/View convertView, https://developer.android.com/reference/android/view/ViewGroup parent) ` Gets a `https://developer.android.com/reference/android/view/View` that displays in the drop down popup the data at the specified position in the data set. | ||
| From interface ` https://developer.android.com/reference/android/widget/Adapter ` |---|---| | ` default https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/widget/Adapter#getAutofillOptions()() ` Gets a string representation of the adapter data that can help `https://developer.android.com/reference/android/service/autofill/AutofillService` autofill the view backed by the adapter. | | ` abstract int` | ` https://developer.android.com/reference/android/widget/Adapter#getCount()() ` How many items are in the data set represented by this Adapter. | | ` abstract https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/android/widget/Adapter#getItem(int)(int position) ` Get the data item associated with the specified position in the data set. | | ` abstract long` | ` https://developer.android.com/reference/android/widget/Adapter#getItemId(int)(int position) ` Get the row id associated with the specified position in the list. | | ` abstract int` | ` https://developer.android.com/reference/android/widget/Adapter#getItemViewType(int)(int position) ` Get the type of View that will be created by `https://developer.android.com/reference/android/widget/Adapter#getView(int,%20android.view.View,%20android.view.ViewGroup)` for the specified item. | | ` abstract https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/widget/Adapter#getView(int,%20android.view.View,%20android.view.ViewGroup)(int position, https://developer.android.com/reference/android/view/View convertView, https://developer.android.com/reference/android/view/ViewGroup parent) ` Get a View that displays the data at the specified position in the data set. | | ` abstract int` | ` https://developer.android.com/reference/android/widget/Adapter#getViewTypeCount()() ` <br /> Returns the number of types of Views that will be created by `https://developer.android.com/reference/android/widget/Adapter#getView(int,%20android.view.View,%20android.view.ViewGroup)`. | | ` abstract boolean` | ` https://developer.android.com/reference/android/widget/Adapter#hasStableIds()() ` Indicates whether the item ids are stable across changes to the underlying data. | | ` abstract boolean` | ` https://developer.android.com/reference/android/widget/Adapter#isEmpty()() ` | | ` abstract void` | ` https://developer.android.com/reference/android/widget/Adapter#registerDataSetObserver(android.database.DataSetObserver)(https://developer.android.com/reference/android/database/DataSetObserver observer) ` Register an observer that is called when changes happen to the data used by this adapter. | | ` abstract void` | ` https://developer.android.com/reference/android/widget/Adapter#unregisterDataSetObserver(android.database.DataSetObserver)(https://developer.android.com/reference/android/database/DataSetObserver observer) ` Unregister an observer that has previously been registered with this adapter via `https://developer.android.com/reference/android/widget/Adapter#registerDataSetObserver(android.database.DataSetObserver)`. | ||

## Public constructors

### ResourceCursorAdapter

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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


**This constructor 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 `https://developer.android.com/reference/android/app/LoaderManager` with a `https://developer.android.com/reference/android/content/CursorLoader`.

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 [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

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

Constructor with default behavior as per
`https://developer.android.com/reference/android/widget/CursorAdapter#CursorAdapter(android.content.Context,%20android.database.Cursor,%20boolean)`; it is recommended
you not use this, but instead `https://developer.android.com/reference/android/widget/ResourceCursorAdapter#ResourceCursorAdapter(android.content.Context,%20int,%20android.database.Cursor,%20int)`.
When using this constructor, `https://developer.android.com/reference/android/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 [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 `https://developer.android.com/reference/android/widget/CursorAdapter#CursorAdapter(android.content.Context,%20android.database.Cursor,%20int)`. <br /> |

## Public methods

### newDropDownView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | the newly created view. <br /> |

### newView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | the newly created view. <br /> |

**See also:**

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

### setDropDownViewResource

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 /> |

### setDropDownViewTheme

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setDropDownViewTheme (Resources.Theme theme)
```

Sets the `https://developer.android.com/reference/android/content/res/Resources.Theme` against which drop-down views are
inflated.


By default, drop-down views are inflated against the theme of the
`https://developer.android.com/reference/android/content/Context` passed to the adapter's constructor.

<br />

| Parameters ||
|---|---|
| `theme` | `Resources.Theme`: the theme against which to inflate drop-down views or `null` to use the theme from the adapter's context <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/ResourceCursorAdapter#newDropDownView(android.content.Context,%20android.database.Cursor,%20android.view.ViewGroup)`

### setViewResource

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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 /> |