<NME> PreferenceLoggingFragment.java
<BEF> package cgeo.geocaching.settings.fragments;

import cgeo.geocaching.R;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.settings.TemplateTextPreference;
import cgeo.geocaching.utils.SettingsUtils;

import android.os.Bundle;

import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;

import static java.util.UUID.randomUUID;

public class PreferenceLoggingFragment extends BasePreferenceFragment {
    PreferenceCategory logTemplatesCategory;

    public void onResume() {
        super.onResume();
        getActivity().setTitle(R.string.settings_title_logging);
        SettingsUtils.setPrefSummary(this, R.string.pref_signature, Settings.getSignature());
        findPreference(getString(R.string.pref_signature)).setOnPreferenceChangeListener((preference, newValue) -> {
            SettingsUtils.setPrefSummary(this, R.string.pref_signature, Settings.getSignature());
            return true;
        });
    }
}
    }

    private void recreateLogTemplatePreferences() {
        logTemplatesCategory.removeAll();
        for (Settings.PrefLogTemplate template : Settings.getLogTemplates()) {
            logTemplatesCategory.addPreference(createLogTemplatePreference(template));
        }
        logTemplatesCategory.addPreference(createLogTemplatePreferenceAddNew());
    }

    private Preference createLogTemplatePreferenceAddNew() {
        final Preference preference = new Preference(requireContext());
        preference.setTitle(R.string.init_log_template_addnew);
        preference.setLayoutResource(R.layout.preference_button);
        preference.setIconSpaceReserved(false);
        preference.setOnPreferenceClickListener(pref -> {
            createLogTemplatePreference(new Settings.PrefLogTemplate(randomUUID().toString(), "", "")).launchEditTemplateDialog();
            return true;
        });
        return preference;
    }

    private TemplateTextPreference createLogTemplatePreference(final Settings.PrefLogTemplate template) {

        final TemplateTextPreference preference = new TemplateTextPreference(requireContext());
        preference.setKey(template.getKey());
        preference.setTitle(template.getTitle());
        preference.setSummary(template.getText());
        preference.setIconSpaceReserved(false);
        preference.setOnPreferenceChangeListener((pref, newValue) -> {
            recreateLogTemplatePreferences();
            return true;
        });
        return preference;
    }
}

<MSG> add 5 log templates

<DFF> @@ -18,10 +18,21 @@ public class PreferenceLoggingFragment extends PreferenceFragmentCompat {
     public void onResume() {
         super.onResume();
         getActivity().setTitle(R.string.settings_title_logging);
+        // Update "Signature" preview
         SettingsUtils.setPrefSummary(this, R.string.pref_signature, Settings.getSignature());
         findPreference(getString(R.string.pref_signature)).setOnPreferenceChangeListener((preference, newValue) -> {
             SettingsUtils.setPrefSummary(this, R.string.pref_signature, Settings.getSignature());
             return true;
         });
+        // Update "Log Templates" previews
+        for (int i = 1; i <= 5; i++) {
+            final int preferenceId = getResources().getIdentifier("pref_logTemplate" + i, "string", getActivity().getPackageName());
+            SettingsUtils.setPrefSummary(this, preferenceId, Settings.getLogTemplatePreview("pref_logTemplate" + i));
+            findPreference(getString(preferenceId)).setOnPreferenceChangeListener((preference, newValue) -> {
+                SettingsUtils.setPrefSummary(this, preferenceId, Settings.getLogTemplatePreview(preference.getKey()));
+                return true;
+            });
+        }
+
     }
 }

add 5 log templates