Move arrival distance to Navigation settings

This commit is contained in:
Victor Shcherb 2014-06-24 01:29:29 +02:00
parent fc9476682b
commit dcf71bf07e
2 changed files with 5 additions and 1 deletions

View file

@ -669,7 +669,7 @@ public class OsmandSettings {
new FloatPreference("speech_rate", 1f).makeGlobal(); new FloatPreference("speech_rate", 1f).makeGlobal();
public final OsmandPreference<Float> ARRIVAL_DISTANCE_FACTOR = public final OsmandPreference<Float> 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 // this value string is synchronized with settings_pref.xml preference name
public final OsmandPreference<Boolean> USE_TRACKBALL_FOR_MOVEMENTS = public final OsmandPreference<Boolean> USE_TRACKBALL_FOR_MOVEMENTS =

View file

@ -101,6 +101,10 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
speakAlarms = (Preference) screen.findPreference("speak_routing_alarms"); speakAlarms = (Preference) screen.findPreference("speak_routing_alarms");
speakAlarms.setOnPreferenceClickListener(this); 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(); profileDialog();
} }