small improvement

This commit is contained in:
sonora 2020-06-08 13:47:14 +02:00
parent d25904764b
commit 75d2affdcb
2 changed files with 2 additions and 1 deletions

View file

@ -53,7 +53,7 @@
android:key="turn_screen_on_power_button" android:key="turn_screen_on_power_button"
android:layout="@layout/preference_with_descr_dialog_and_switch" android:layout="@layout/preference_with_descr_dialog_and_switch"
android:persistent="false" 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:summaryOn="@string/shared_string_enabled"
android:title="@string/turn_screen_on_power_button" /> android:title="@string/turn_screen_on_power_button" />

View file

@ -103,6 +103,7 @@ public class TurnScreenOnFragment extends BaseSettingsFragment implements OnPref
turnScreenOnPowerButton.setDescription(R.string.turn_screen_on_power_button_descr); turnScreenOnPowerButton.setDescription(R.string.turn_screen_on_power_button_descr);
turnScreenOnPowerButton.setIcon(getPersistentPrefIcon(R.drawable.ic_action_power_button)); turnScreenOnPowerButton.setIcon(getPersistentPrefIcon(R.drawable.ic_action_power_button));
turnScreenOnPowerButton.setChecked(enabled && settings.TURN_SCREEN_ON_POWER_BUTTON.getModeValue(appMode)); 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 @Override