/**@class android.widget.ExpandableListAdapter An adapter that links a {@link android.widget.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 {@link View}s for children and groups. */ var ExpandableListAdapter = { /** @see Adapter#registerDataSetObserver(DataSetObserver) */ registerDataSetObserver : function( ) {}, /** @see Adapter#unregisterDataSetObserver(DataSetObserver) */ unregisterDataSetObserver : function( ) {}, /**Gets the number of groups. @return {Number} the number of groups */ getGroupCount : function( ) {}, /**Gets the number of children in a specified group. @param {Number} groupPosition the position of the group for which the children count should be returned @return {Number} the children count in the specified group */ getChildrenCount : function( ) {}, /**Gets the data associated with the given group. @param {Number} groupPosition the position of the group @return {Object {java.lang.Object}} the data child for the specified group */ getGroup : function( ) {}, /**Gets the data associated with the given child within the given group. @param {Number} groupPosition the position of the group that the child resides in @param {Number} childPosition the position of the child with respect to other children in the group @return {Object {java.lang.Object}} the data of the child */ getChild : function( ) {}, /**Gets the ID for the group at the given position. This group ID must be unique across groups. The combined ID (see {@link #getCombinedGroupId}(long)) must be unique across ALL items (groups and all children). @param {Number} groupPosition the position of the group for which the ID is wanted @return {Number} the ID associated with the group */ getGroupId : function( ) {}, /**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 {@link #getCombinedChildId(long, long)}) must be unique across ALL items (groups and all children). @param {Number} groupPosition the position of the group that contains the child @param {Number} childPosition the position of the child within the group for which the ID is wanted @return {Number} the ID associated with the child */ getChildId : function( ) {}, /**Indicates whether the child and group IDs are stable across changes to the underlying data. @return {Boolean} whether or not the same ID always refers to the same object @see Adapter#hasStableIds() */ hasStableIds : function( ) {}, /**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 {@link #getChildView(int, int, boolean, View, ViewGroup)}. @param {Number} groupPosition the position of the group for which the View is returned @param {Boolean} isExpanded whether the group is expanded or collapsed @param {Object {View}} 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 {@link #getGroupView(int, boolean, View, ViewGroup)}. @param {Object {ViewGroup}} parent the parent that this view will eventually be attached to @return {Object {android.view.View}} the View corresponding to the group at the specified position */ getGroupView : function( ) {}, /**Gets a View that displays the data for the given child within the given group. @param {Number} groupPosition the position of the group that contains the child @param {Number} childPosition the position of the child (for which the View is returned) within the group @param {Boolean} isLastChild Whether the child is the last child within the group @param {Object {View}} 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 {@link #getChildView(int, int, boolean, View, ViewGroup)}. @param {Object {ViewGroup}} parent the parent that this view will eventually be attached to @return {Object {android.view.View}} the View corresponding to the child at the specified position */ getChildView : function( ) {}, /**Whether the child at the specified position is selectable. @param {Number} groupPosition the position of the group that contains the child @param {Number} childPosition the position of the child within the group @return {Boolean} whether the child is selectable. */ isChildSelectable : function( ) {}, /** @see ListAdapter#areAllItemsEnabled() */ areAllItemsEnabled : function( ) {}, /** @see ListAdapter#isEmpty() */ isEmpty : function( ) {}, /**Called when a group is expanded. @param {Number} groupPosition The group being expanded. */ onGroupExpanded : function( ) {}, /**Called when a group is collapsed. @param {Number} groupPosition The group being collapsed. */ onGroupCollapsed : function( ) {}, /**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 {@link #hasStableIds}() is true, the returned ID must be stable as well. @param {Number} groupId The ID of the group that contains this child. @param {Number} childId The ID of the child. @return {Number} The unique (and possibly stable) ID of the child across all groups and children in this list. */ getCombinedChildId : function( ) {}, /**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 {@link #hasStableIds}() is true, the returned ID must be stable as well. @param {Number} groupId The ID of the group @return {Number} The unique (and possibly stable) ID of the group across all groups and children in this list. */ getCombinedGroupId : function( ) {}, };