@NotNull
    private GeocacheFilter getFilterFromView() {
        IGeocacheFilter filter = null;

        if (filterListAdapter.getItemCount() > 0) {
            filter = andOrFilterCheckbox.isChecked() ? new OrGeocacheFilter() : new AndGeocacheFilter();
            for (IFilterViewHolder<?> f : filterListAdapter.getItems()) {
                filter.addChild(FilterViewHolderCreator.createFrom(f));
            }
            if (inverseFilterCheckbox.isChecked()) {
                final IGeocacheFilter notFilter = new NotGeocacheFilter();
                notFilter.addChild(filter);
                filter = notFilter;
            }
        }

        return GeocacheFilter.create(
                GeocacheFilter.getPurifiedFilterName(binding.filterStorageName.getText().toString()),
                binding.filterBasicAdvanced.isChecked(),
                this.includeInconclusiveFilterCheckbox.isChecked(),
                filter);
    }
Show a filter selection using an {@code ExpandableListView}.
main/src/main/java/cgeo/geocaching/filters/gui/GeocacheFilterActivity.java