From e17b8f1341b9b2561ecaa6bb9be215d590794566 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 14 Dec 2020 12:57:31 +0200 Subject: [PATCH] Add description about reset to default --- .../plus/settings/fragments/ConfigureProfileFragment.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureProfileFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureProfileFragment.java index ae1b2eba36..48ceba0a11 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureProfileFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureProfileFragment.java @@ -36,6 +36,7 @@ import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.development.OsmandDevelopmentPlugin; import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.helpers.FontCache; import net.osmand.plus.openseamapsplugin.NauticalMapsPlugin; @@ -345,6 +346,12 @@ public class ConfigureProfileFragment extends BaseSettingsFragment implements Co if (mode.isCustomProfile() && !getBackupFileForCustomMode(app, mode.getStringKey()).exists()) { resetToDefault.setVisible(false); } else { + OsmandDevelopmentPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandDevelopmentPlugin.class); + if (plugin != null && mode.getParent() != null) { + String baseProfile = "(" + mode.getParent().toHumanString() + ")"; + String title = getString(R.string.ltr_or_rtl_combine_via_space, getString(R.string.reset_to_default), baseProfile); + resetToDefault.setTitle(title); + } resetToDefault.setIcon(app.getUIUtilities().getIcon(R.drawable.ic_action_reset_to_default_dark, isNightMode() ? R.color.active_color_primary_dark : R.color.active_color_primary_light)); }