Code example for ExpandableListView

Methods: getFlatListPosition

        if (isOutOfBounds(packedPosition)) {
            throw new IllegalStateException("position out of range for adapter!");
        final ExpandableListView elv = getExpandableListView();
        final int flPos = elv.getFlatListPosition(packedPosition); 
        if (convertView != null) {
            ((TextView) convertView).setText(getValueAtPosition(packedPosition));
            return convertView;
        int desiredHeight = getHeightForPosition(flPos);
        return createView(packedPosition, flPos, parent, desiredHeight);
     * Create a view for a group or child position. 
Connect your IDE to all the code out there  Get Codota for Java