use of net.osmand.plus.settings.preferences.SwitchPreferenceEx in project Osmand by osmandapp.
the class RouteParametersFragment method setupFastRecalculationPref.
private void setupFastRecalculationPref() {
SwitchPreferenceEx useFastRecalculation = createSwitchPreferenceEx(settings.USE_FAST_RECALCULATION.getId(), R.string.use_fast_recalculation, R.layout.preference_with_descr_dialog_and_switch);
useFastRecalculation.setDescription(getString(R.string.use_fast_recalculation_desc));
useFastRecalculation.setSummaryOn(R.string.shared_string_enabled);
useFastRecalculation.setSummaryOff(R.string.shared_string_disabled);
useFastRecalculation.setIcon(getPersistentPrefIcon(R.drawable.ic_action_route_part));
useFastRecalculation.setIconSpaceReserved(true);
getPreferenceScreen().addPreference(useFastRecalculation);
}
use of net.osmand.plus.settings.preferences.SwitchPreferenceEx in project Osmand by osmandapp.
the class TurnScreenOnFragment method setupUseSystemScreenTimeout.
private void setupUseSystemScreenTimeout() {
SwitchPreferenceEx systemScreenTimeout = (SwitchPreferenceEx) findPreference(settings.USE_SYSTEM_SCREEN_TIMEOUT.getId());
systemScreenTimeout.setDescription(R.string.system_screen_timeout_descr);
}
use of net.osmand.plus.settings.preferences.SwitchPreferenceEx in project Osmand by osmandapp.
the class TurnScreenOnFragment method setupTurnScreenOnPowerButtonPref.
private void setupTurnScreenOnPowerButtonPref() {
ApplicationMode appMode = getSelectedAppMode();
boolean enabled = settings.TURN_SCREEN_ON_TIME_INT.getModeValue(appMode) == 0 || settings.USE_SYSTEM_SCREEN_TIMEOUT.getModeValue(appMode);
SwitchPreferenceEx turnScreenOnPowerButton = (SwitchPreferenceEx) findPreference(settings.TURN_SCREEN_ON_POWER_BUTTON.getId());
turnScreenOnPowerButton.setEnabled(enabled);
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);
}
use of net.osmand.plus.settings.preferences.SwitchPreferenceEx in project Osmand by osmandapp.
the class TurnScreenOnFragment method setupTurnScreenOnNavigationInstructionsPref.
private void setupTurnScreenOnNavigationInstructionsPref() {
SwitchPreferenceEx turnScreenOnNavigationInstructions = (SwitchPreferenceEx) findPreference(settings.TURN_SCREEN_ON_NAVIGATION_INSTRUCTIONS.getId());
turnScreenOnNavigationInstructions.setIcon(getPersistentPrefIcon(R.drawable.ic_action_notification_navigation));
turnScreenOnNavigationInstructions.setDescription(R.string.turn_screen_on_navigation_instructions_descr);
}
use of net.osmand.plus.settings.preferences.SwitchPreferenceEx in project Osmand by osmandapp.
the class AccessibilitySettingsFragment method setupDirectionAudioFeedbackPref.
private void setupDirectionAudioFeedbackPref() {
SwitchPreferenceEx directionAudioFeedback = (SwitchPreferenceEx) findPreference(settings.DIRECTION_AUDIO_FEEDBACK.getId());
directionAudioFeedback.setDescription(getString(R.string.access_direction_audio_feedback_descr));
}
Aggregations