public int findInsertIdxByDivider ( JQMListDivider d ) { if ( d == null ) return - 1 ; int i = findDividerIdx ( d ) ; if ( i == - 1 ) return - 1 ; List < JQMListItem > lst = getItems ( ) ; int rslt = i + 1 ; while ( rslt < lst . size ( ) ) { if ( lst . get ( rslt ) == null ) { // next divider return rslt ; } rslt ++ ; } return rslt ; }
For given divider finds the index at which new item should be inserted to become a part of this divider s group .