private List < AbstractItem > getRawItems ( ) { if ( rawItems == null ) { rawItems = new ArrayList <> ( ) ; for ( int i = 0 ; i < items . size ( ) ; i ++ ) { AbstractItem item = items . get ( i ) ; if ( item instanceof Divider && columnCount > 1 ) { for ( int j = 0 ; j < rawItems . size ( ) % columnCount ; j ++ ) { rawItems . add ( null ) ; } rawItems . add ( item ) ; for ( int j = 0 ; j < columnCount - 1 ; j ++ ) { rawItems . add ( new Divider ( ) ) ; } } else { rawItems . add ( item ) ; } } } return rawItems ; }
Returns a list which contains the items of the adapter including placeholders .