# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Methods

# HeterogeneousExpandableList

`public interface HeterogeneousExpandableList`
``

android.widget.HeterogeneousExpandableList

Known indirect subclasses BaseExpandableListAdapter, CursorTreeAdapter, ResourceCursorTreeAdapter, SimpleCursorTreeAdapter, SimpleExpandableListAdapter
BaseExpandableListAdapter | Base class for a `ExpandableListAdapter` used to provide data and Views from some data to an expandable list view.
CursorTreeAdapter | An adapter that exposes data from a series of `Cursor`s to an `ExpandableListView` widget.
ResourceCursorTreeAdapter | A fairly simple ExpandableListAdapter that creates views defined in an XML file.
SimpleCursorTreeAdapter | An easy adapter to map columns from a cursor to TextViews or ImageViews defined in an XML file.
SimpleExpandableListAdapter | An easy adapter to map static data to group and child views defined in an XML file.

Additional methods that when implemented make an `ExpandableListAdapter` take advantage of the `Adapter` view type mechanism.

An `ExpandableListAdapter` declares it has one view type for its group items and one view type for its child items. Although adapted for most `ExpandableListView`s, these values should be tuned for heterogeneous `ExpandableListView`s.

Lists that contain different types of group and/or child item views, should use an adapter that implements this interface. This way, the recycled views that will be provided to `ExpandableListAdapter.getGroupView(int, boolean, View, ViewGroup)` and `ExpandableListAdapter.getChildView(int, int, boolean, View, ViewGroup)` will be of the appropriate group or child type, resulting in a more efficient reuse of the previously created views.

## Summary

### Public methods
`abstract int` | `getChildType(int groupPosition, int childPosition)` Get the type of child View that will be created by `ExpandableListAdapter.getChildView(int, int, boolean, View, ViewGroup)` for the specified child item.
`abstract int` | `getChildTypeCount()` Returns the number of types of child Views that will be created by `ExpandableListAdapter.getChildView(int, int, boolean, View, ViewGroup)` .
`abstract int` | `getGroupType(int groupPosition)` Get the type of group View that will be created by `ExpandableListAdapter.getGroupView(int, boolean, View, ViewGroup)` .
`abstract int` | `getGroupTypeCount()` Returns the number of types of group Views that will be created by `ExpandableListAdapter.getGroupView(int, boolean, View, ViewGroup)` .

## Public methods

### getChildType

    public abstract int getChildType (int groupPosition,
                    int childPosition)

Get the type of child View that will be created by `ExpandableListAdapter.getChildView(int, int, boolean, View, ViewGroup)` for the specified child item.

Parameters
`groupPosition` | `int`: the position of the group that the child resides in
`childPosition` | `int`: the position of the child with respect to other children in the group

Returns
`int` | An integer representing the type of child View. Two child views should share the same type if one can be converted to the other in `ExpandableListAdapter.getChildView(int, int, boolean, View, ViewGroup)` Note: Integers must be in the range 0 to `getChildTypeCount()` - 1. `Adapter.IGNORE_ITEM_VIEW_TYPE` can also be returned.

See also:

- `Adapter.IGNORE_ITEM_VIEW_TYPE`
- `getChildTypeCount()`

### getChildTypeCount

    public abstract int getChildTypeCount ()

Returns the number of types of child Views that will be created by `ExpandableListAdapter.getChildView(int, int, boolean, View, ViewGroup)` . Each type represents a set of views that can be converted in `ExpandableListAdapter.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.

This method will only be called when the adapter is set on the `AdapterView`.

Returns
`int` | The total number of types of child Views that will be created by this adapter.

See also:

- `getGroupTypeCount()`
- `getChildType(int, int)`

### getGroupType

    public abstract int getGroupType (int groupPosition)

Get the type of group View that will be created by `ExpandableListAdapter.getGroupView(int, boolean, View, ViewGroup)` . for the specified group item.

Parameters
`groupPosition` | `int`: the position of the group for which the type should be returned.

Returns
`int` | An integer representing the type of group View. Two group views should share the same type if one can be converted to the other in `ExpandableListAdapter.getGroupView(int, boolean, View, ViewGroup)` . Note: Integers must be in the range 0 to `getGroupTypeCount()` - 1. `Adapter.IGNORE_ITEM_VIEW_TYPE` can also be returned.

See also:

- `Adapter.IGNORE_ITEM_VIEW_TYPE`
- `getGroupTypeCount()`

### getGroupTypeCount

    public abstract int getGroupTypeCount ()

Returns the number of types of group Views that will be created by `ExpandableListAdapter.getGroupView(int, boolean, View, ViewGroup)` . Each type represents a set of views that can be converted in `ExpandableListAdapter.getGroupView(int, boolean, View, ViewGroup)` . If the adapter always returns the same type of View for all group items, this method should return 1.

This method will only be called when the adapter is set on the `AdapterView`.

Returns
`int` | The number of types of group Views that will be created by this adapter.

See also:

- `getChildTypeCount()`
- `getGroupType(int)`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*