java.lang.Object | ||
↳ | android.widget.BaseExpandableListAdapter | |
↳ | android.widget.CursorTreeAdapter |
Known Direct Subclasses |
Known Indirect Subclasses |
An adapter that exposes data from a series of
Cursor
s to an
ExpandableListView
widget. The top-level
Cursor
(that is
given in the constructor) exposes the groups, while subsequent
Cursor
s
returned from
getChildrenCursor(Cursor)
expose children within a
particular group. The Cursors must include a column named "_id" or this class
will not work.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructor.
|
||||||||||
|
Constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
Returns a filter that can be used to constrain data with a filtering pattern. |
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
Notifies a data set change, but with the option of not releasing any
cached cursors.
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
Called when a group is collapsed.
|
||||||||||
|
|
||||||||||
|
Sets the children Cursor for a particular group.
|
||||||||||
|
|
||||||||||
|
Sets the group Cursor.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Bind an existing view to the child data pointed to by cursor
|
||||||||||
|
Bind an existing view to the group data pointed to by cursor.
|
||||||||||
|
Gets the Cursor for the children at the given group.
|
||||||||||
|
Makes a new child view to hold the data pointed to by cursor.
|
||||||||||
|
Makes a new group view to hold the group data pointed to by cursor.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.widget.BaseExpandableListAdapter
|
|||||||||||
From class
java.lang.Object
|
|||||||||||
From interface
android.widget.ExpandableListAdapter
|
|||||||||||
From interface
android.widget.Filterable
|
|||||||||||
From interface
android.widget.HeterogeneousExpandableList
|
Constructor. The adapter will call
requery()
on the cursor whenever
it changes so that the most recent data is always displayed.
cursor | The cursor from which to get the data for the groups. |
---|
Constructor.
cursor | The cursor from which to get the data for the groups. |
---|---|
context | The context |
autoRequery |
If true the adapter will call
requery()
on the cursor whenever it changes so the most recent data is
always displayed.
|
Returns a filter that can be used to constrain data with a filtering pattern.
This method is usually implemented by
Adapter
classes.
Notifies a data set change, but with the option of not releasing any cached cursors.
releaseCursors | Whether to release and deactivate any cached cursors. |
---|
Called when a group is collapsed.
groupPosition | The group being collapsed. |
---|
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.
groupPosition | The group whose children are being set via this Cursor. |
---|---|
childrenCursor | The Cursor that contains the children of the group. |
Sets the group Cursor.
cursor | The Cursor to set for the group. If there is an existing cursor it will be closed. |
---|
Bind an existing view to the child data pointed to by cursor
view | Existing view, returned earlier by newChildView |
---|---|
context | Interface to application's global information |
cursor | The cursor from which to get the data. The cursor is already moved to the correct position. |
isLastChild | Whether the child is the last child within its group. |
Bind an existing view to the group data pointed to by cursor.
view | Existing view, returned earlier by newGroupView. |
---|---|
context | Interface to application's global information |
cursor | The cursor from which to get the data. The cursor is already moved to the correct position. |
isExpanded | Whether the group is expanded. |
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, Cursor)
.
It is your responsibility to manage this Cursor through the Activity
lifecycle. It is a good idea to use
managedQuery(Uri, String[], String, String[], 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.
groupCursor | The cursor pointing to the group whose children cursor should be returned |
---|
Makes a new child view to hold the data pointed to by cursor.
context | Interface to application's global information |
---|---|
cursor | The cursor from which to get the data. The cursor is already moved to the correct position. |
isLastChild | Whether the child is the last child within its group. |
parent | The parent to which the new view is attached to |
Makes a new group view to hold the group data pointed to by cursor.
context | Interface to application's global information |
---|---|
cursor | The group cursor from which to get the data. The cursor is already moved to the correct position. |
isExpanded | Whether the group is expanded. |
parent | The parent to which the new view is attached to |