android.widget.ExpandableListAdapter |
Known Indirect Subclasses |
An adapter that links a
ExpandableListView
with the underlying
data. The implementation of this interface will provide access
to the data of the children (categorized by groups), and also instantiate
View
s for children and groups.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||
|
Gets the data associated with the given child within the given group.
|
||||||||||
|
Gets the ID for the given child within the given group.
|
||||||||||
|
Gets a View that displays the data for the given child within the given
group.
|
||||||||||
|
Gets the number of children in a specified group.
|
||||||||||
|
Gets an ID for a child that is unique across any item (either group or
child) that is in this list.
|
||||||||||
|
Gets an ID for a group that is unique across any item (either group or
child) that is in this list.
|
||||||||||
|
Gets the data associated with the given group.
|
||||||||||
|
Gets the number of groups.
|
||||||||||
|
Gets the ID for the group at the given position.
|
||||||||||
|
Gets a View that displays the given group.
|
||||||||||
|
Indicates whether the child and group IDs are stable across changes to the
underlying data.
|
||||||||||
|
Whether the child at the specified position is selectable.
|
||||||||||
|
|
||||||||||
|
Called when a group is collapsed.
|
||||||||||
|
Called when a group is expanded.
|
||||||||||
|
|
||||||||||
|
|
Gets the data associated with the given child within the given group.
groupPosition | the position of the group that the child resides in |
---|---|
childPosition | the position of the child with respect to other children in the group |
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)
) must be unique across ALL items
(groups and all children).
groupPosition | the position of the group that contains the child |
---|---|
childPosition | the position of the child within the group for which the ID is wanted |
Gets a View that displays the data for the given child within the given group.
groupPosition | the position of the group that contains the child |
---|---|
childPosition | the position of the child (for which the View is returned) within the group |
isLastChild | Whether the child is the last child within the group |
convertView |
the old view to reuse, if possible. You should check
that this view is non-null and of an appropriate type before
using. If it is not possible to convert this view to display
the correct data, this method can create a new view. It is not
guaranteed that the convertView will have been previously
created by
getChildView(int, int, boolean, View, ViewGroup)
.
|
parent | the parent that this view will eventually be attached to |
Gets the number of children in a specified group.
groupPosition | the position of the group for which the children count should be returned |
---|
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()
is true, the
returned ID must be stable as well.
groupId | The ID of the group that contains this child. |
---|---|
childId | The ID of the child. |
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()
is true, the returned ID must be
stable as well.
groupId | The ID of the group |
---|
Gets the data associated with the given group.
groupPosition | the position of the group |
---|
Gets the number of groups.
Gets the ID for the group at the given position. This group ID must be
unique across groups. The combined ID (see
getCombinedGroupId(long)
) must be unique across ALL items
(groups and all children).
groupPosition | the position of the group for which the ID is wanted |
---|
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, View, ViewGroup)
.
groupPosition | the position of the group for which the View is returned |
---|---|
isExpanded | whether the group is expanded or collapsed |
convertView |
the old view to reuse, if possible. You should check
that this view is non-null and of an appropriate type before
using. If it is not possible to convert this view to display
the correct data, this method can create a new view. It is not
guaranteed that the convertView will have been previously
created by
getGroupView(int, boolean, View, ViewGroup)
.
|
parent | the parent that this view will eventually be attached to |
Indicates whether the child and group IDs are stable across changes to the underlying data.
Whether the child at the specified position is selectable.
groupPosition | the position of the group that contains the child |
---|---|
childPosition | the position of the child within the group |
Called when a group is collapsed.
groupPosition | The group being collapsed. |
---|
Called when a group is expanded.
groupPosition | The group being expanded. |
---|