private void updateDialogIndividualRoute(final View dialog, final IndividualRoute individualRoute, final Action2<Geopoint, String> setTarget, @Nullable final Action2<Route, Boolean> showElevationChart) {
        if (dialog == null) {
            return;
        }
        final boolean hasIndividualRoute = isRouteNonEmpty(individualRoute);
        dialog.findViewById(R.id.indivroute).setVisibility(hasIndividualRoute ? View.VISIBLE : View.GONE);
        final View v = dialog.findViewById(R.id.indivroute_load);
        v.setVisibility(hasIndividualRoute ? View.GONE : View.VISIBLE);
        v.setOnClickListener(hasIndividualRoute ? null : (view) -> {
            startFileSelectorIndividualRoute();
            this.dialog.dismiss();
        });

        if (hasIndividualRoute) {
            final Toolbar tb = dialog.findViewById(R.id.routes_track_item);
            if (tb.getMenu() == null || tb.getMenu().size() == 0) {
                tb.inflateMenu(R.menu.map_routetrack_context);
            }
            tb.setOnMenuItemClickListener(item -> handleContextMenuClick(item, showElevationChart, individualRoute, () -> updateDialogIndividualRoute(dialog, individualRoute, setTarget, showElevationChart)));
            final Menu menu = tb.getMenu();
            configureContextMenu(menu, true, individualRoute, false);

            final CheckBox vAutoTarget = dialog.findViewById(R.id.auto_target);
            vAutoTarget.setChecked(Settings.isAutotargetIndividualRoute());
            vAutoTarget.setOnClickListener(v1 -> {
                setAutotargetIndividualRoute(activity, individualRoute, !Settings.isAutotargetIndividualRoute());
                updateDialogClearTargets(popup, individualRoute, setTarget, showElevationChart);
            });
        }
        updateDialogClearTargets(dialog, individualRoute, setTarget, showElevationChart);
    }
show a popup for track/individual route, opened by using a long-tap on that item on the map
main/src/main/java/cgeo/geocaching/maps/RouteTrackUtils.java