private void handleVariableOutOfSync() {
            final Map<String, Pair<String, String>> diff = cache.getVariableDifferencesFromUserNotes();
            if (diff.isEmpty()) {
                return;
            }
            final List<ImmutableTriple<String, String, String>> items = CollectionStream.of(diff.entrySet())
                    .map(e -> new ImmutableTriple<>(e.getKey(), e.getValue().first, e.getValue().second)).toList();
            TextUtils.sortListLocaleAware(items, i -> i.left);

            final SimpleDialog.ItemSelectModel<ImmutableTriple<String, String, String>> model = new SimpleDialog.ItemSelectModel<>();
            model.setItems(items).setDisplayMapper((i) -> TextParam.id(R.string.cache_personal_note_vars_out_of_sync_line, i.left, i.middle, i.right));
            SimpleDialog.of(getActivity()).setTitle(TextParam.id(R.string.cache_personal_note_vars_out_of_sync_dialog_title))
                    .setMessage(TextParam.id(R.string.cache_personal_note_vars_out_of_sync_title))
                    .selectMultiple(model, sel -> {
                           final Map<String, String> toChange = new HashMap<>();
                           for (ImmutableTriple<String, String, String> e : sel) {
                               toChange.put(e.left, e.middle);
                           }
                           cache.changeVariables(toChange);
                        ((CacheDetailActivity) getActivity()).adjustPersonalNoteVarsOutOfSyncButton(binding.personalnoteVarsOutOfSync);
                    });
        }
Show/hide buttons, set text in favorite line and box
main/src/main/java/cgeo/geocaching/CacheDetailActivity.java