# ResourceCursorTreeAdapter

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

# ResourceCursorTreeAdapter

*** ** * ** ***

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

```
abstract class ResourceCursorTreeAdapter : CursorTreeAdapter
```

|---|---|---|--------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                             ||||
| ↳ | [android.widget.BaseExpandableListAdapter](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter)        |||
|   | ↳ | [android.widget.CursorTreeAdapter](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter)                     ||
|   |   | ↳ | [android.widget.ResourceCursorTreeAdapter](https://developer.android.com/reference/kotlin/android/widget/ResourceCursorTreeAdapter#) |

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

A fairly simple ExpandableListAdapter that creates views defined in an XML file. You can specify the XML file that defines the appearance of the views.

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                        Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [ResourceCursorTreeAdapter](https://developer.android.com/reference/kotlin/android/widget/ResourceCursorTreeAdapter#ResourceCursorTreeAdapter(android.content.Context,%20android.database.Cursor,%20kotlin.Int,%20kotlin.Int))`(`context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `cursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`, `groupLayout:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childLayout:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Constructor.                                                                                                                                                                                                                                            |
| [ResourceCursorTreeAdapter](https://developer.android.com/reference/kotlin/android/widget/ResourceCursorTreeAdapter#ResourceCursorTreeAdapter(android.content.Context,%20android.database.Cursor,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `cursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`, `collapsedGroupLayout:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `expandedGroupLayout:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childLayout:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Constructor.                                                                                                                |
| [ResourceCursorTreeAdapter](https://developer.android.com/reference/kotlin/android/widget/ResourceCursorTreeAdapter#ResourceCursorTreeAdapter(android.content.Context,%20android.database.Cursor,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `cursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`, `collapsedGroupLayout:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `expandedGroupLayout:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childLayout:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `lastChildLayout:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Constructor. |

|                                                                                                                                                                                                                                                                                                                                                               Public methods                                                                                                                                                                                                                                                                                                                                                               ||
|-------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[View](https://developer.android.com/reference/kotlin/android/view/View.html#)! | [newChildView](https://developer.android.com/reference/kotlin/android/widget/ResourceCursorTreeAdapter#newChildView(android.content.Context,%20android.database.Cursor,%20kotlin.Boolean,%20android.view.ViewGroup))`(`context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `cursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`, `isLastChild:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `parent:` `[ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#)!`)` <br /> |
| open[View](https://developer.android.com/reference/kotlin/android/view/View.html#)! | [newGroupView](https://developer.android.com/reference/kotlin/android/widget/ResourceCursorTreeAdapter#newGroupView(android.content.Context,%20android.database.Cursor,%20kotlin.Boolean,%20android.view.ViewGroup))`(`context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `cursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`, `isExpanded:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `parent:` `[ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#)!`)` <br />  |

| Inherited functions ||
|---|---|
| From class[BaseExpandableListAdapter](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter) |------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [areAllItemsEnabled](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#areAllItemsEnabled())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getChildType](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#getChildType(kotlin.Int,%20kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Get the type of child View that will be created by[android.widget.ExpandableListAdapter#getChildView(int, int, boolean, View, ViewGroup)](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getChildView(kotlin.Int,%20kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup))for the specified child item. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getChildTypeCount](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#getChildTypeCount())`()` <br /> Returns the number of types of child Views that will be created by[android.widget.ExpandableListAdapter#getChildView(int, int, boolean, View, ViewGroup)](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getChildView(kotlin.Int,%20kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup)). Each type represents a set of views that can be converted in[android.widget.ExpandableListAdapter#getChildView(int, int, boolean, View, ViewGroup)](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getChildView(kotlin.Int,%20kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup)), for any group. If the adapter always returns the same type of View for all child items, this method should return 1. This method will only be called when the adapter is set on the[AdapterView](https://developer.android.com/reference/kotlin/android/widget/AdapterView). <br />                                       | | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)       | [getCombinedChildId](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#getCombinedChildId(kotlin.Long,%20kotlin.Long))`(`groupId:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, `childId:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` <br /> Override this method if you foresee a clash in IDs based on this scheme: Base implementation returns a long: - bit 0: Whether this ID points to a child (unset) or group (set), so for this method this bit will be 1. - bit 1-31: Lower 31 bits of the groupId - bit 32-63: Lower 32 bits of the childId.Gets an ID for a child that is unique across any item (either group or child) that is in this list. Expandable lists require each item (group or child) to have a unique ID among all children and groups in the list. This method is responsible for returning that unique ID given a child's ID and its group's ID. Furthermore, if[hasStableIds()](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#hasStableIds())is true, the returned ID must be stable as well. | | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)       | [getCombinedGroupId](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#getCombinedGroupId(kotlin.Long))`(`groupId:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` <br /> Override this method if you foresee a clash in IDs based on this scheme: Base implementation returns a long: - bit 0: Whether this ID points to a child (unset) or group (set), so for this method this bit will be 0. - bit 1-31: Lower 31 bits of the groupId - bit 32-63: Lower 32 bits of the childId.Gets an ID for a group that is unique across any item (either group or child) that is in this list. Expandable lists require each item (group or child) to have a unique ID among all children and groups in the list. This method is responsible for returning that unique ID given a group's ID. Furthermore, if[hasStableIds()](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#hasStableIds())is true, the returned ID must be stable as well.                                                                                                                              | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getGroupType](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#getGroupType(kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Get the type of group View that will be created by[android.widget.ExpandableListAdapter#getGroupView(int, boolean, View, ViewGroup)](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getGroupView(kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup)). for the specified group item. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getGroupTypeCount](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#getGroupTypeCount())`()` <br /> Returns the number of types of group Views that will be created by[android.widget.ExpandableListAdapter#getGroupView(int, boolean, View, ViewGroup)](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getGroupView(kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup)). Each type represents a set of views that can be converted in[android.widget.ExpandableListAdapter#getGroupView(int, boolean, View, ViewGroup)](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getGroupView(kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup)). If the adapter always returns the same type of View for all group items, this method should return 1. This method will only be called when the adapter is set on the[AdapterView](https://developer.android.com/reference/kotlin/android/widget/AdapterView). <br />                                                                                            | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isEmpty](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#isEmpty())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [onGroupExpanded](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#onGroupExpanded(kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [registerDataSetObserver](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#registerDataSetObserver(android.database.DataSetObserver))`(`observer:` `[DataSetObserver](https://developer.android.com/reference/kotlin/android/database/DataSetObserver.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [unregisterDataSetObserver](https://developer.android.com/reference/kotlin/android/widget/BaseExpandableListAdapter#unregisterDataSetObserver(android.database.DataSetObserver))`(`observer:` `[DataSetObserver](https://developer.android.com/reference/kotlin/android/database/DataSetObserver.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | ||
| From class[CursorTreeAdapter](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter) |-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [bindChildView](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#bindChildView(android.view.View,%20android.content.Context,%20android.database.Cursor,%20kotlin.Boolean))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `cursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`, `isLastChild:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> Bind an existing view to the child data pointed to by cursor <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [bindGroupView](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#bindGroupView(android.view.View,%20android.content.Context,%20android.database.Cursor,%20kotlin.Boolean))`(`view:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `context:` `[Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!`, `cursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`, `isExpanded:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> Bind an existing view to the group data pointed to by cursor. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [changeCursor](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#changeCursor(android.database.Cursor))`(`cursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!                         | [convertToString](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#convertToString(android.database.Cursor))`(`cursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!                   | [getChild](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getChild(kotlin.Int,%20kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)                              | [getChildId](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getChildId(kotlin.Int,%20kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [View](https://developer.android.com/reference/kotlin/android/view/View.html#)!                           | [getChildView](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getChildView(kotlin.Int,%20kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `isLastChild:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `convertView:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `parent:` `[ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                | [getChildrenCount](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getChildrenCount(kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!                   | [getChildrenCursor](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getChildrenCursor(android.database.Cursor))`(`groupCursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`)` <br /> Gets the Cursor for the children at the given group. Subclasses must implement this method to return the children data for a particular group. If you want to asynchronously query a provider to prevent blocking the UI, it is possible to return null and at a later time call[setChildrenCursor(int,android.database.Cursor)](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#setChildrenCursor(kotlin.Int,%20android.database.Cursor)). It is your responsibility to manage this Cursor through the Activity lifecycle. It is a good idea to use[Activity.managedQuery](https://developer.android.com/reference/kotlin/android/app/Activity.html#managedQuery(android.net.Uri,%20kotlin.Array,%20kotlin.String,%20kotlin.Array,%20kotlin.String))which will handle this for you. In some situations, the adapter will deactivate the Cursor on its own, but this will not always be the case, so please ensure the Cursor is properly managed. <br /> | | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!                   | [getCursor](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getCursor())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Filter](https://developer.android.com/reference/kotlin/android/widget/Filter)!                           | [getFilter](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getFilter())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [FilterQueryProvider](https://developer.android.com/reference/kotlin/android/widget/FilterQueryProvider)! | [getFilterQueryProvider](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getFilterQueryProvider())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!                   | [getGroup](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getGroup(kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                | [getGroupCount](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getGroupCount())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)                              | [getGroupId](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getGroupId(kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [View](https://developer.android.com/reference/kotlin/android/view/View.html#)!                           | [getGroupView](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#getGroupView(kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `isExpanded:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `convertView:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `parent:` `[ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                        | [hasStableIds](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#hasStableIds())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                        | [isChildSelectable](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#isChildSelectable(kotlin.Int,%20kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [notifyDataSetChanged](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#notifyDataSetChanged())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [notifyDataSetChanged](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#notifyDataSetChanged(kotlin.Boolean))`(`releaseCursors:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` <br /> Notifies a data set change, but with the option of not releasing any cached cursors. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [notifyDataSetInvalidated](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#notifyDataSetInvalidated())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [onGroupCollapsed](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#onGroupCollapsed(kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!                   | [runQueryOnBackgroundThread](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#runQueryOnBackgroundThread(kotlin.CharSequence))`(`constraint:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [setChildrenCursor](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#setChildrenCursor(kotlin.Int,%20android.database.Cursor))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childrenCursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`)` <br /> Sets the children Cursor for a particular group. If there is an existing cursor it will be closed. This is useful when asynchronously querying to prevent blocking the UI. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [setFilterQueryProvider](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#setFilterQueryProvider(android.widget.FilterQueryProvider))`(`filterQueryProvider:` `[FilterQueryProvider](https://developer.android.com/reference/kotlin/android/widget/FilterQueryProvider)!`)` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                              | [setGroupCursor](https://developer.android.com/reference/kotlin/android/widget/CursorTreeAdapter#setGroupCursor(android.database.Cursor))`(`cursor:` `[Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!`)` <br /> Sets the group Cursor. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | ||
| From class[ExpandableListAdapter](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter) |------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!        | [getChild](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getChild(kotlin.Int,%20kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Gets the data associated with the given child within the given group. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)       | [getChildId](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getChildId(kotlin.Int,%20kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Gets the ID for the given child within the given group. This ID must be unique across all children within the group. The combined ID (see[getCombinedChildId(long,long)](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getCombinedChildId(kotlin.Long,%20kotlin.Long))) must be unique across ALL items (groups and all children). <br />                                                                                                                                                                                                                                                                                                        | | [View](https://developer.android.com/reference/kotlin/android/view/View.html#)!    | [getChildView](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getChildView(kotlin.Int,%20kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `isLastChild:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `convertView:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `parent:` `[ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#)!`)` <br /> Gets a View that displays the data for the given child within the given group. <br />                                                                                                                                                                                                               | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getChildrenCount](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getChildrenCount(kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Gets the number of children in a specified group. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!        | [getGroup](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getGroup(kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Gets the data associated with the given group. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getGroupCount](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getGroupCount())`()` <br /> Gets the number of groups. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)       | [getGroupId](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getGroupId(kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Gets the ID for the group at the given position. This group ID must be unique across groups. The combined ID (see[getCombinedGroupId(long)](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getCombinedGroupId(kotlin.Long))) must be unique across ALL items (groups and all children). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [View](https://developer.android.com/reference/kotlin/android/view/View.html#)!    | [getGroupView](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getGroupView(kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `isExpanded:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `convertView:` `[View](https://developer.android.com/reference/kotlin/android/view/View.html#)!`, `parent:` `[ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#)!`)` <br /> Gets a View that displays the given group. This View is only for the group--the Views for the group's children will be fetched using[getChildView(int,int,boolean,android.view.View,android.view.ViewGroup)](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#getChildView(kotlin.Int,%20kotlin.Int,%20kotlin.Boolean,%20android.view.View,%20android.view.ViewGroup)). <br /> | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [hasStableIds](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#hasStableIds())`()` <br /> Indicates whether the child and group IDs are stable across changes to the underlying data. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isChildSelectable](https://developer.android.com/reference/kotlin/android/widget/ExpandableListAdapter#isChildSelectable(kotlin.Int,%20kotlin.Int))`(`groupPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `childPosition:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Whether the child at the specified position is selectable. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | ||

## Public constructors

### ResourceCursorTreeAdapter

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

```
ResourceCursorTreeAdapter(
    context: Context!, 
    cursor: Cursor!, 
    groupLayout: Int, 
    childLayout: Int)
```

Constructor.

|                                                                                          Parameters                                                                                          ||
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`     | [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!:The context where the ListView associated with this SimpleListItemFactory is running |
| `cursor`      | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!:The database cursor                                                                   |
| `groupLayout` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):resource identifier of a layout file that defines the views for all groups.                        |
| `childLayout` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):resource identifier of a layout file that defines the views for all children.                      |

### ResourceCursorTreeAdapter

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

```
ResourceCursorTreeAdapter(
    context: Context!, 
    cursor: Cursor!, 
    collapsedGroupLayout: Int, 
    expandedGroupLayout: Int, 
    childLayout: Int)
```

Constructor.

|                                                                                              Parameters                                                                                               ||
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`              | [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!:The context where the ListView associated with this SimpleListItemFactory is running |
| `cursor`               | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!:The database cursor                                                                   |
| `collapsedGroupLayout` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):resource identifier of a layout file that defines the views for collapsed groups.                  |
| `expandedGroupLayout`  | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):resource identifier of a layout file that defines the views for expanded groups.                   |
| `childLayout`          | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):resource identifier of a layout file that defines the views for all children.                      |

### ResourceCursorTreeAdapter

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

```
ResourceCursorTreeAdapter(
    context: Context!, 
    cursor: Cursor!, 
    collapsedGroupLayout: Int, 
    expandedGroupLayout: Int, 
    childLayout: Int, 
    lastChildLayout: Int)
```

Constructor.

|                                                                                              Parameters                                                                                               ||
|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`              | [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!:The context where the ListView associated with this SimpleListItemFactory is running |
| `cursor`               | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!:The database cursor                                                                   |
| `collapsedGroupLayout` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):resource identifier of a layout file that defines the views for collapsed groups.                  |
| `expandedGroupLayout`  | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):resource identifier of a layout file that defines the views for expanded groups.                   |
| `childLayout`          | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):resource identifier of a layout file that defines the views for all children but the last..        |
| `lastChildLayout`      | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):resource identifier of a layout file that defines the views for the last child of a group.         |

## Public methods

### newChildView

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

```
open fun newChildView(
    context: Context!, 
    cursor: Cursor!, 
    isLastChild: Boolean, 
    parent: ViewGroup!
): View!
```

|                                                                                             Parameters                                                                                             ||
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`     | [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!:Interface to application's global information                                              |
| `cursor`      | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!:The cursor from which to get the data. The cursor is already moved to the correct position. |
| `isLastChild` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):Whether the child is the last child within its group.                                            |
| `parent`      | [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#)!:The parent to which the new view is attached to                                           |

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

### newGroupView

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

```
open fun newGroupView(
    context: Context!, 
    cursor: Cursor!, 
    isExpanded: Boolean, 
    parent: ViewGroup!
): View!
```

|                                                                                               Parameters                                                                                                ||
|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`    | [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!:Interface to application's global information                                                    |
| `cursor`     | [Cursor](https://developer.android.com/reference/kotlin/android/database/Cursor.html#)!:The group cursor from which to get the data. The cursor is already moved to the correct position. |
| `isExpanded` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):Whether the group is expanded.                                                                         |
| `parent`     | [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html#)!:The parent to which the new view is attached to                                                 |

|                                                  Return                                                  ||
|---------------------------------------------------------------------------------|-------------------------|
| [View](https://developer.android.com/reference/kotlin/android/view/View.html#)! | The newly created view. |