From 75d2affdcb3573d56a4b14ffcbfaf64c794f5af6 Mon Sep 17 00:00:00 2001 From: sonora Date: Mon, 8 Jun 2020 13:47:14 +0200 Subject: [PATCH] small improvement --- OsmAnd/res/xml/turn_screen_on.xml | 2 +- .../osmand/plus/settings/fragments/TurnScreenOnFragment.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/xml/turn_screen_on.xml b/OsmAnd/res/xml/turn_screen_on.xml index 41425558d9..10baab536d 100644 --- a/OsmAnd/res/xml/turn_screen_on.xml +++ b/OsmAnd/res/xml/turn_screen_on.xml @@ -53,7 +53,7 @@ android:key="turn_screen_on_power_button" android:layout="@layout/preference_with_descr_dialog_and_switch" android:persistent="false" - android:summaryOff="@string/turn_screen_on_power_button_disabled" + android:summaryOff="@string/shared_string_disabled" android:summaryOn="@string/shared_string_enabled" android:title="@string/turn_screen_on_power_button" /> diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java index 40aea7d75b..4e2fb22d31 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/TurnScreenOnFragment.java @@ -103,6 +103,7 @@ public class TurnScreenOnFragment extends BaseSettingsFragment implements OnPref turnScreenOnPowerButton.setDescription(R.string.turn_screen_on_power_button_descr); turnScreenOnPowerButton.setIcon(getPersistentPrefIcon(R.drawable.ic_action_power_button)); turnScreenOnPowerButton.setChecked(enabled && settings.TURN_SCREEN_ON_POWER_BUTTON.getModeValue(appMode)); + turnScreenOnPowerButton.setSummaryOff(enabled ? R.string.shared_string_disabled : R.string.turn_screen_on_power_button_disabled); } @Override