private int getPackedGroupPosition ( final int groupIndex ) { int packedPosition = getHeaderViewsCount ( ) ; if ( groupIndex > 0 ) { for ( int i = groupIndex - 1 ; i >= 0 ; i -- ) { packedPosition += getExpandableListAdapter ( ) . getChildrenCount ( i ) + 1 ; } } return packedPosition ; }
Returns the packed position of a group which corresponds to a specific index .