use of net.osmand.plus.settings.preferences.SwitchPreferenceEx in project Osmand by osmandapp.
the class RouteParametersFragment method setupNativePublicTransport.
private void setupNativePublicTransport() {
SwitchPreferenceEx setupNativePublicTransport = createSwitchPreferenceEx(settings.PT_SAFE_MODE.getId(), R.string.use_native_pt, R.layout.preference_with_descr_dialog_and_switch);
setupNativePublicTransport.setDescription(getString(R.string.use_native_pt_desc));
setupNativePublicTransport.setSummaryOn(R.string.shared_string_enabled);
setupNativePublicTransport.setSummaryOff(R.string.shared_string_disabled);
setupNativePublicTransport.setIconSpaceReserved(true);
getPreferenceScreen().addPreference(setupNativePublicTransport);
}
use of net.osmand.plus.settings.preferences.SwitchPreferenceEx in project Osmand by osmandapp.
the class RouteParametersFragment method setupSelectRouteRecalcDistance.
private void setupSelectRouteRecalcDistance(PreferenceScreen screen) {
final SwitchPreferenceEx switchPref = createSwitchPreferenceEx(ROUTING_RECALC_DISTANCE, R.string.route_recalculation_dist_title, R.layout.preference_with_descr_dialog_and_switch);
switchPref.setIcon(getRoutingPrefIcon(ROUTING_RECALC_DISTANCE));
screen.addPreference(switchPref);
updateRouteRecalcDistancePref();
}
use of net.osmand.plus.settings.preferences.SwitchPreferenceEx in project Osmand by osmandapp.
the class RouteParametersFragment method setupTimeConditionalRoutingPref.
private void setupTimeConditionalRoutingPref() {
SwitchPreferenceEx timeConditionalRouting = createSwitchPreferenceEx(settings.ENABLE_TIME_CONDITIONAL_ROUTING.getId(), R.string.temporary_conditional_routing, R.layout.preference_with_descr_dialog_and_switch);
timeConditionalRouting.setIcon(getRoutingPrefIcon(settings.ENABLE_TIME_CONDITIONAL_ROUTING.getId()));
timeConditionalRouting.setSummaryOn(R.string.shared_string_on);
timeConditionalRouting.setSummaryOff(R.string.shared_string_off);
timeConditionalRouting.setDescription(R.string.temporary_conditional_routing_descr);
getPreferenceScreen().addPreference(timeConditionalRouting);
}
use of net.osmand.plus.settings.preferences.SwitchPreferenceEx in project Osmand by osmandapp.
the class TurnScreenOnFragment method setupTurnScreenOnSensorPref.
private void setupTurnScreenOnSensorPref() {
SwitchPreferenceEx turnScreenOnSensor = (SwitchPreferenceEx) findPreference(settings.TURN_SCREEN_ON_SENSOR.getId());
turnScreenOnSensor.setIcon(getPersistentPrefIcon(R.drawable.ic_action_sensor_interaction));
turnScreenOnSensor.setDescription(R.string.turn_screen_on_sensor_descr);
}
use of net.osmand.plus.settings.preferences.SwitchPreferenceEx in project Osmand by osmandapp.
the class OsmEditingFragment method setupOfflineEditingPref.
private void setupOfflineEditingPref() {
Drawable disabled = getContentIcon(R.drawable.ic_action_offline);
Drawable enabled = getActiveIcon(R.drawable.ic_world_globe_dark);
Drawable icon = getPersistentPrefIcon(enabled, disabled);
SwitchPreferenceEx offlineEditingPref = findPreference(plugin.OFFLINE_EDITION.getId());
offlineEditingPref.setDescription(getString(R.string.offline_edition_descr));
offlineEditingPref.setIcon(icon);
}
Aggregations