private void fillViewFromFilter(final String inputFilter, final boolean forceAdvanced) {
        includeInconclusiveFilterCheckbox.setChecked(false);
        inverseFilterCheckbox.setChecked(false);
        andOrFilterCheckbox.setChecked(false);

        boolean setAdvanced = false;
        if (inputFilter != null) {
            try {
                final List<IFilterViewHolder<?>> filterList = new ArrayList<>();
                final GeocacheFilter filter = GeocacheFilter.checkConfig(inputFilter);
                FilterUtils.setFilterText(binding.filterStorageName, filter.getNameForUserDisplay(), filter.isSavedDifferently());
                includeInconclusiveFilterCheckbox.setChecked(filter.isIncludeInconclusive());
                setAdvanced = filter.isOpenInAdvancedMode();
                IGeocacheFilter filterTree = filter.getTree();
                if (filterTree instanceof NotGeocacheFilter) {
                    inverseFilterCheckbox.setChecked(true);
                    filterTree = filterTree.getChildren().get(0);
                }
                if (filterTree instanceof LogicalGeocacheFilter) {
                    andOrFilterCheckbox.setChecked(filterTree instanceof OrGeocacheFilter);
                    for (IGeocacheFilter c : filterTree.getChildren()) {
                        filterList.add(FilterViewHolderCreator.createFor(c, this));
                    }
                } else if (filterTree instanceof BaseGeocacheFilter) {
                    filterList.add(FilterViewHolderCreator.createFor(filterTree, this));
                }
                filterListAdapter.setItems(filterList);
                adjustFilterEmptyView();
            } catch (ParseException pe) {
                Log.w("Exception parsing input filter", pe);
            }
        }


        //set basic/advanced switch -> AFTER list is re-layouted
        if (!forceAdvanced && !setAdvanced && isBasicPossibleWithoutLoss()) {
            switchToBasic();
        } else {
            switchToAdvanced(false);
        }
    }
Show a filter selection using an {@code ExpandableListView}.
main/src/main/java/cgeo/geocaching/filters/gui/GeocacheFilterActivity.java