java.lang.Object | |
↳ | android.widget.BaseExpandableListAdapter |
Known Direct Subclasses |
Known Indirect Subclasses |
Base class for a
ExpandableListAdapter
used to provide data and Views
from some data to an expandable list view.
Adapters inheriting this class should verify that the base implementations of
getCombinedChildId(long, long)
and
getCombinedGroupId(long)
are correct in generating unique IDs from the group/children IDs.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||
|
Get the type of child View that will be created by
getChildView(int, int, boolean, View, ViewGroup)
for the specified child item.
|
||||||||||
|
Returns the number of types of child Views that will be created by
|
||||||||||
|
Override this method if you foresee a clash in IDs based on this scheme:
Base implementation returns a long: |
||||||||||
|
Override this method if you foresee a clash in IDs based on this scheme:
Base implementation returns a long: |
||||||||||
|
Get the type of group View that will be created by
getGroupView(int, boolean, View, ViewGroup)
.
|
||||||||||
|
Returns the number of types of group Views that will be created by
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
Called when a group is collapsed.
|
||||||||||
|
Called when a group is expanded.
|
||||||||||
|
|
||||||||||
|
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
|||||||||||
From interface
android.widget.ExpandableListAdapter
|
|||||||||||
From interface
android.widget.HeterogeneousExpandableList
|
Get the type of child View that will be created by
getChildView(int, int, boolean, View, ViewGroup)
for the specified child item.
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 |
Returns the number of types of child Views that will be created by
getChildView(int, int, boolean, View, ViewGroup)
. Each type represents a set of views that can be converted in
getChildView(int, int, boolean, View, ViewGroup)
, for any group. If the adapter always returns the same type of View for
all child items, this method should return 1.
AdapterView
.
Override this method if you foresee a clash in IDs based on this scheme:
Base implementation returns a long:
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. |
Override this method if you foresee a clash in IDs based on this scheme:
Base implementation returns a long:
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 |
---|
Get the type of group View that will be created by
getGroupView(int, boolean, View, ViewGroup)
. for the specified group item.
groupPosition | the position of the group for which the type should be returned. |
---|
Returns the number of types of group Views that will be created by
getGroupView(int, boolean, View, ViewGroup)
. Each type represents a set of views that can be converted in
getGroupView(int, boolean, View, ViewGroup)
. If the adapter always returns the same type of View for all group items, this method should
return 1.
AdapterView
.
Called when a group is collapsed.
groupPosition | The group being collapsed. |
---|
Called when a group is expanded.
groupPosition | The group being expanded. |
---|