Code example for SectionIndexer

Methods: getSectionForPosition

0
		} 
		if (mSectionIndexerV2 != null) {
			mSectionTextV2 = mSectionIndexerV2.getSectionTextForPosition(index);
		} else { 
			if (sections != null && sections.length > 1) {
				sectionIndex = mSectionIndexerV1.getSectionForPosition(index);
				if (sectionIndex >=0 && sectionIndex < sections.length)
					mSectionTextV1 = sections[sectionIndex].toString();
				else 
					mSectionTextV1 = null;					
			} else { 
				sectionIndex = -1;
				mSectionTextV1 = null;
			} 
		} 
 
		if ( (mSectionTextV2 != null ) || (mSectionTextV1 != null && mSectionTextV1.length() > 0)) {
			mDrawOverlay = true; //(mSectionText.length() != 1 || mSectionText.charAt(0) != ' ')
							; //&& sectionIndex < sections.length; 
		} else { 
			mDrawOverlay = false;