From dcf71bf07e32545e981eb7470b75c174891b0b40 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 24 Jun 2014 01:29:29 +0200 Subject: [PATCH] Move arrival distance to Navigation settings --- OsmAnd/src/net/osmand/plus/OsmandSettings.java | 2 +- .../osmand/plus/activities/SettingsNavigationActivity.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index e594758614..28e72eb8f1 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -669,7 +669,7 @@ public class OsmandSettings { new FloatPreference("speech_rate", 1f).makeGlobal(); public final OsmandPreference ARRIVAL_DISTANCE_FACTOR = - new FloatPreference("arrival_distance_factor", 1f).makeGlobal(); + new FloatPreference("arrival_distance_factor", 1f).makeProfile(); // this value string is synchronized with settings_pref.xml preference name public final OsmandPreference USE_TRACKBALL_FOR_MOVEMENTS = diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index 5227d544a2..11814fed22 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -101,6 +101,10 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { speakAlarms = (Preference) screen.findPreference("speak_routing_alarms"); speakAlarms.setOnPreferenceClickListener(this); + Float[] arrivalValues = new Float[] {1.5f, 1f, 0.5f, 0.25f} ; + String[] arrivalNames = getResources().getStringArray(R.array.arrival_distance_factors); + registerListPreference(settings.ARRIVAL_DISTANCE_FACTOR, screen, arrivalNames, arrivalValues); + profileDialog(); }