From 6e64bab4078703998de0912e55c4b41e3b9c0b88 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 3 Apr 2020 18:08:10 +0300 Subject: [PATCH] Fix app modes ui state --- OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java index 236507214c..0bf4a223ba 100644 --- a/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/MainSettingsFragment.java @@ -184,13 +184,14 @@ public class MainSettingsFragment extends BaseSettingsFragment { SwitchPreferenceEx pref = new SwitchPreferenceEx(app); pref.setPersistent(false); pref.setKey(applicationMode.getStringKey()); + preferenceCategory.addPreference(pref); + pref.setIcon(getAppProfilesIcon(applicationMode, isAppProfileEnabled)); pref.setTitle(applicationMode.toHumanString()); pref.setSummary(getAppModeDescription(getContext(), applicationMode)); pref.setChecked(isAppProfileEnabled); pref.setLayoutResource(R.layout.preference_with_descr_dialog_and_switch); pref.setFragment(ConfigureProfileFragment.class.getName()); - preferenceCategory.addPreference(pref); } }