Code example for AlphabetIndexer

Methods: getSectionForPosition

0
 
    @Override 
    public int getSectionForPosition(int position) {
        if(alphaIndexer != null) {
            try { 
                return alphaIndexer.getSectionForPosition(position);
            }catch(CursorIndexOutOfBoundsException e) {
                // Not a problem we are just not yet init 
            } 
        } 
        return 0; 
    } 
 
    @Override 
    public Object[] getSections() {
        if(alphaIndexer != null) {
            return alphaIndexer.getSections();
        } 
        return null; 
    } 
Experience pair programming with AI  Get Codota for Java