private void dropUserdefinedWaypoints() {
        if (null != cache && cache.hasUserdefinedWaypoints()) {
            String info = getString(R.string.cache_delete_userdefined_waypoints_confirm);
            if (!cache.isPreventWaypointsFromNote()) {
                info += "\n\n" + getString(R.string.cache_delete_userdefined_waypoints_note);
            }
            SimpleDialog.of(this).setTitle(R.string.cache_delete_userdefined_waypoints).setMessage(TextParam.text(info)).confirm(() -> {
                for (Waypoint waypoint : new LinkedList<>(cache.getWaypoints())) {
                    if (waypoint.isUserDefined()) {
                        cache.deleteWaypoint(waypoint);
                    }
                }
                if (cache.addCacheArtefactsFromNotes()) {
                    Schedulers.io().scheduleDirect(this::saveAndNotify);
                }
                ActivityMixin.showShortToast(this, R.string.cache_delete_userdefined_waypoints_success);
                invalidateOptionsMenu();
                reinitializePage(Page.WAYPOINTS.id);
            });
        }
    }
Enum of all possible pages with methods to get the view and a title.
main/src/main/java/cgeo/geocaching/CacheDetailActivity.java