@Override
               public int getSpanSize(final int pos) {
                   final ListItem item = listAdapter.getItem(pos);
                   if (item.type == ListItemType.ITEM) {
                       final int span = model.getColumnSpanMapper() == null ? 1 : model.getColumnSpanMapper().apply(item.value);
                       return Math.max(1, Math.min(columnCount, span));
                   }
                   return columnCount;
               }
This view displays and maintains a list of simple view items, mainly for (single or multiple)
item selection lists. It provides special support for grouping, filtering and "select all" for such
lists.
main/src/main/java/cgeo/geocaching/ui/SimpleItemListView.java