private void triggerRefreshList() {

        //prepare overall list data which is needed for display routines
        int visible = 0;
        int visibleSelected = 0;
        this.itemsHaveIcons = false;
        this.groupsHaveIcons = false;

        reevaluateItemVisibility();

        for (ListItem item : listAdapter.getOriginalItems()) {
            switch (item.type) {
                case GROUPHEADER:
                    if (item.icon != null) {
                        this.groupsHaveIcons = true;
                    }
                    break;
                case ITEM:
                    if (item.icon != null) {
                        this.itemsHaveIcons = true;
                    }
                    if (item.isVisible) {
                        visible++;
                        if (model.getSelectedItems().contains(item.value)) {
                            visibleSelected++;
                        }
                    }
                    break;
                default:
                    //do nothing
                    break;
            }
        }
        this.currentlyVisible = visible;
        this.currentlyVisibleSelected = visibleSelected;

        //trigger re-filtering and re-drawing of list items
        listAdapter.setFilter(t -> listAdapter.isDisplayed(t));
        listAdapter.notifyItemRangeChanged(0, listAdapter.getItemCount());
    }
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