@ Override public int getPositionForSection ( int sectionIndex ) { if ( mSectionList . size ( ) == 0 ) { for ( Integer key : mSections . keySet ( ) ) { mSectionList . add ( key ) ; } } return sectionIndex < mSectionList . size ( ) ? mSectionList . get ( sectionIndex ) : getCount ( ) ; }
Given the index of a section within the array of section objects returns the starting position of that section within the adapter .