diff --git a/android/app/src/main/java/app/organicmaps/settings/SettingsPrefsFragment.java b/android/app/src/main/java/app/organicmaps/settings/SettingsPrefsFragment.java index ec3cc6de07..9f12c5d41c 100644 --- a/android/app/src/main/java/app/organicmaps/settings/SettingsPrefsFragment.java +++ b/android/app/src/main/java/app/organicmaps/settings/SettingsPrefsFragment.java @@ -104,13 +104,21 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment @Override public boolean onPreferenceTreeClick(Preference preference) { - if (preference.getKey() != null && preference.getKey().equals(getString(R.string.pref_osm_profile))) + final String key = preference.getKey(); + if (key != null) { - startActivity(new Intent(requireActivity(), ProfileActivity.class)); - } - else if (preference.getKey() != null && preference.getKey().equals(getString(R.string.pref_help))) - { - startActivity(new Intent(requireActivity(), HelpActivity.class)); + if (key.equals(getString(R.string.pref_osm_profile))) + { + startActivity(new Intent(requireActivity(), ProfileActivity.class)); + } + else if (key.equals(getString(R.string.pref_tts_screen))) + { + getSettingsActivity().stackFragment(VoiceInstructionsSettingsFragment.class, getString(R.string.pref_tts_enable_title), null); + } + else if (key.equals(getString(R.string.pref_help))) + { + startActivity(new Intent(requireActivity(), HelpActivity.class)); + } } return super.onPreferenceTreeClick(preference); } diff --git a/android/app/src/main/res/xml/prefs_main.xml b/android/app/src/main/res/xml/prefs_main.xml index 9e64281a11..af9c2cd597 100644 --- a/android/app/src/main/res/xml/prefs_main.xml +++ b/android/app/src/main/res/xml/prefs_main.xml @@ -125,8 +125,7 @@ android:title="@string/pref_tts_enable_title" app:singleLineTitle="false" android:persistent="false" - android:order="4" - app:fragment="app.organicmaps.settings.VoiceInstructionsSettingsFragment"> + android:order="4">