@Override
        public void setContent() {
            // retrieve activity and cache - if either if this is null, something is really wrong...
            final CacheDetailActivity activity = (CacheDetailActivity) getActivity();
            if (activity == null) {
                return;
            }
            cache = activity.getCache();
            if (cache == null) {
                return;
            }

            final ListView v = binding.getRoot();
            v.setVisibility(View.VISIBLE);
            v.setClickable(true);

            // sort waypoints: PP, Sx, FI, OWN
            final List<Waypoint> sortedWaypoints = createSortedWaypointList(cache);
            Collections.sort(sortedWaypoints, cache.getWaypointComparator());

            final ArrayAdapter<Waypoint> adapter = new ArrayAdapter<Waypoint>(activity, R.layout.waypoint_item, sortedWaypoints) {
                @NonNull
                @Override
                public View getView(final int position, final View convertView, @NonNull final ViewGroup parent) {
                    View rowView = convertView;
                    if (rowView == null) {
                        rowView = getLayoutInflater().inflate(R.layout.waypoint_item, parent, false);
                        rowView.setClickable(true);
                        rowView.setLongClickable(true);
                        registerForContextMenu(rowView);
                    }
                    WaypointViewHolder holder = (WaypointViewHolder) rowView.getTag();
                    if (holder == null) {
                        holder = new WaypointViewHolder(rowView);
                    }

                    final Waypoint waypoint = getItem(position);
                    fillViewHolder(activity, rowView, holder, waypoint);
                    return rowView;
                }
            };
            v.setAdapter(adapter);
            v.setOnScrollListener(new FastScrollListener(v));

            if (activity.selectedWaypoint != null) {
                final int index = indexOfWaypoint(cache, activity.selectedWaypoint);
                if (index >= 0) {
                    v.setSelection(index);
                }
            }

            //register for changes of variableslist -> calculated waypoints may have changed
            cache.getVariables().addChangeListener(this, s -> activity.runOnUiThread(adapter::notifyDataSetChanged));

            if (v.getHeaderViewsCount() < 1) {
                final CachedetailWaypointsHeaderBinding headerBinding = CachedetailWaypointsHeaderBinding.inflate(getLayoutInflater(), v, false);
                v.addHeaderView(headerBinding.getRoot());

                headerBinding.addWaypoint.setOnClickListener(v2 -> {
                    activity.ensureSaved();
                    EditWaypointActivity.startActivityAddWaypoint(activity, cache);
                    if (sortedWaypoints != null && !sortedWaypoints.isEmpty()) {
                        activity.selectedWaypoint = sortedWaypoints.get(sortedWaypoints.size() - 1); // move to bottom where new waypoint will be created
                    }
                    activity.setNeedsRefresh();
                });

                headerBinding.addWaypointCurrentlocation.setOnClickListener(v2 -> {
                    activity.ensureSaved();
                    final Waypoint newWaypoint = new Waypoint(Waypoint.getDefaultWaypointName(cache, WaypointType.WAYPOINT), WaypointType.WAYPOINT, true);
                    newWaypoint.setCoords(LocationDataProvider.getInstance().currentGeo().getCoords());
                    newWaypoint.setGeocode(cache.getGeocode());
                    if (cache.addOrChangeWaypoint(newWaypoint, true)) {
                        addWaypointAndSort(sortedWaypoints, newWaypoint);
                        adapter.notifyDataSetChanged();
                        activity.reinitializePage(Page.WAYPOINTS.id);
                        ActivityMixin.showShortToast(activity, getString(R.string.waypoint_added));
                    }
                });

                headerBinding.hideVisitedWaypoints.setChecked(Settings.getHideVisitedWaypoints());
                headerBinding.hideVisitedWaypoints.setOnCheckedChangeListener((buttonView, isChecked) -> {
                    Settings.setHideVisitedWaypoints(isChecked);

                    final List<Waypoint> sortedWaypoints2 = createSortedWaypointList(cache);
                    Collections.sort(sortedWaypoints2, cache.getWaypointComparator());

                    adapter.clear();
                    adapter.addAll(sortedWaypoints2);
                    adapter.notifyDataSetChanged();
                    activity.reinitializePage(Page.WAYPOINTS.id);
                });


                // read waypoint from clipboard
                setClipboardButtonVisibility(headerBinding.addWaypointFromclipboard);
                headerBinding.addWaypointFromclipboard.setOnClickListener(v2 -> {
                    final Waypoint oldWaypoint = DataStore.loadWaypoint(Waypoint.hasClipboardWaypoint());
                    if (null != oldWaypoint) {
                        activity.ensureSaved();
                        final Waypoint newWaypoint = cache.duplicateWaypoint(oldWaypoint, cache.getGeocode().equals(oldWaypoint.getGeocode()));
                        if (null != newWaypoint) {
                            CacheDetailActivity.saveAndNotify(getContext(), cache);
                            addWaypointAndSort(sortedWaypoints, newWaypoint);
                            adapter.notifyDataSetChanged();
                            activity.reinitializePage(Page.WAYPOINTS.id);
                            if (oldWaypoint.isUserDefined()) {
                                SimpleDialog.of((Activity) v.getContext()).setTitle(R.string.cache_waypoints_add_fromclipboard).setMessage(R.string.cache_waypoints_remove_original_waypoint).confirm(() -> {
                                    DataStore.deleteWaypoint(oldWaypoint.getId());
                                    ClipboardUtils.clearClipboard();
                                });
                            }
                        }
                    }
                });

                final ClipboardManager cliboardManager = (ClipboardManager) activity.getSystemService(CLIPBOARD_SERVICE);
                cliboardManager.addPrimaryClipChangedListener(() -> setClipboardButtonVisibility(headerBinding.addWaypointFromclipboard));
            }
        }
Old GCParser logic inserted an HTML link to their geochecker (when applicable)
directly into the description text.
When running on Android 12 this direct URL might be redirected to c:geo under
specific system settings, leading to a loop (see #12889), so let's reassign
this link to the proper openGeochecker method.

@param activity calling activity
main/src/main/java/cgeo/geocaching/CacheDetailActivity.java