Code example for SectionIndexer

Methods: getSectionForPosition

0
    public int getSectionForPosition(int position) {
        if (mIndexer == null) {
            return -1; 
        } 
 
        return mIndexer.getSectionForPosition(position);
    } 
 
    @Override 
    public int getPinnedHeaderCount() { 
        if (isSectionHeaderDisplayEnabled()) { 
            return super.getPinnedHeaderCount() + 1; 
        } else { 
            return super.getPinnedHeaderCount(); 
        } 
    } 
 
    @Override 
    public View getPinnedHeaderView(int viewIndex, View convertView, ViewGroup parent) {
        if (isSectionHeaderDisplayEnabled() && viewIndex == getPinnedHeaderCount() - 1) {
            if (mHeader == null) {