@Override
    public void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setThemeAndContentView(R.layout.cache_filter_activity);
        binding = CacheFilterActivityBinding.bind(findViewById(R.id.cachefilter_activity_viewroot));

        binding.filterPropsCheckboxes.removeAllViews();
        this.andOrFilterCheckbox = ViewUtils.addCheckboxItem(this, binding.filterPropsCheckboxes, TextParam.id(R.string.cache_filter_option_and_or), R.drawable.ic_menu_logic);
        this.inverseFilterCheckbox = ViewUtils.addCheckboxItem(this, binding.filterPropsCheckboxes, TextParam.id(R.string.cache_filter_option_inverse), R.drawable.ic_menu_invert);

        final ImmutablePair<View, CheckBox> includeInconclusiveFilterCheckboxItem = ViewUtils.createCheckboxItem(this, binding.filterPropsCheckboxes, TextParam.id(R.string.cache_filter_option_include_inconclusive), ImageParam.id(R.drawable.ic_menu_vague), TextParam.id(R.string.cache_filter_option_include_inconclusive_info));
        binding.filterPropsCheckboxes.addView(includeInconclusiveFilterCheckboxItem.left);
        this.includeInconclusiveFilterCheckbox = includeInconclusiveFilterCheckboxItem.right;

        filterListAdapter = new FilterListAdapter(binding.filterList);
        initializeFilterAdd();
        initializeStorageOptions();

        // Get parameters from intent and basic cache information from database
        final Bundle extras = getIntent().getExtras();

        if (extras != null) {
            filterContext = extras.getParcelable(EXTRA_FILTER_CONTEXT);
            isNested = extras.getBoolean(EXTRA_IS_NESTED);
        }
        if (filterContext == null) {
            filterContext = new GeocacheFilterContext(TRANSIENT);
        }

        setTitle(getString(filterContext.getType().titleId));
        fillViewFromFilter(filterContext.get().toConfig(), false);
        originalFilterConfig = getFilterFromView().toConfig();

        // Some features do not work / make no sense for nested filters
        if (isNested) {
            setTitle(getString(R.string.cache_filter_contexttype_nestedfilter_title));
            binding.filterBasicAdvanced.setVisibility(View.GONE);
            binding.filterStorageOptions.setVisibility(View.GONE);
            binding.filterStorageOptionsLine.setVisibility(View.GONE);
            includeInconclusiveFilterCheckboxItem.left.setVisibility(View.GONE);
        }

        this.binding.filterBasicAdvanced.setOnCheckedChangeListener((v, c) -> {
            if (!processBasicAdvancedListener) {
                return;
            }

            if (c) {
                switchToAdvanced(true);
            } else if (isBasicPossibleWithoutLoss()) {
                switchToBasic();
            } else {
                SimpleDialog.of(this).setTitle(R.string.cache_filter_mode_basic_change_confirm_loss_title).setMessage(R.string.cache_filter_mode_basic_change_confirm_loss_message).confirm(
                        this::switchToBasic, () -> {
                            processBasicAdvancedListener = false;
                            this.binding.filterBasicAdvanced.setChecked(true);
                            processBasicAdvancedListener = true;
                        });
            }
        });
    }
Show a filter selection using an {@code ExpandableListView}.
main/src/main/java/cgeo/geocaching/filters/gui/GeocacheFilterActivity.java