|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.widget.BaseExpandableListAdapter
public abstract class BaseExpandableListAdapter
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.
SimpleExpandableListAdapter,
SimpleCursorTreeAdapter| Constructor Summary | |
|---|---|
BaseExpandableListAdapter()
|
|
| Method Summary | |
|---|---|
boolean |
areAllItemsEnabled()
|
long |
getCombinedChildId(long groupId,
long childId)
Override this method if you foresee a clash in IDs based on this scheme: |
long |
getCombinedGroupId(long groupId)
Override this method if you foresee a clash in IDs based on this scheme: |
boolean |
isEmpty()
|
void |
notifyDataSetChanged()
DataSetObservable.notifyChanged() |
void |
notifyDataSetInvalidated()
DataSetObservable.notifyInvalidated() |
void |
onGroupCollapsed(int groupPosition)
Called when a group is collapsed. |
void |
onGroupExpanded(int groupPosition)
Called when a group is expanded. |
void |
registerDataSetObserver(DataSetObserver observer)
|
void |
unregisterDataSetObserver(DataSetObserver observer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface android.widget.ExpandableListAdapter |
|---|
getChild, getChildId, getChildrenCount, getChildView, getGroup, getGroupCount, getGroupId, getGroupView, hasStableIds, isChildSelectable |
| Constructor Detail |
|---|
public BaseExpandableListAdapter()
| Method Detail |
|---|
public void registerDataSetObserver(DataSetObserver observer)
registerDataSetObserver in interface ExpandableListAdapterAdapter.registerDataSetObserver(DataSetObserver)public void unregisterDataSetObserver(DataSetObserver observer)
unregisterDataSetObserver in interface ExpandableListAdapterAdapter.unregisterDataSetObserver(DataSetObserver)public void notifyDataSetInvalidated()
DataSetObservable.notifyInvalidated()
public void notifyDataSetChanged()
DataSetObservable.notifyChanged()
public boolean areAllItemsEnabled()
areAllItemsEnabled in interface ExpandableListAdapterListAdapter.areAllItemsEnabled()public void onGroupCollapsed(int groupPosition)
ExpandableListAdapter
onGroupCollapsed in interface ExpandableListAdaptergroupPosition - The group being collapsed.public void onGroupExpanded(int groupPosition)
ExpandableListAdapter
onGroupExpanded in interface ExpandableListAdaptergroupPosition - The group being expanded.
public long getCombinedChildId(long groupId,
long childId)
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 ExpandableListAdapter.hasStableIds() is true, the
returned ID must be stable as well.
getCombinedChildId in interface ExpandableListAdaptergroupId - The ID of the group that contains this child.childId - The ID of the child.
public long getCombinedGroupId(long groupId)
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 ExpandableListAdapter.hasStableIds() is true, the returned ID must be
stable as well.
getCombinedGroupId in interface ExpandableListAdaptergroupId - The ID of the group
public boolean isEmpty()
isEmpty in interface ExpandableListAdapterAdapter.isEmpty()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||