Speed limit exceed setting will be shown for car and other simular mods.

This commit is contained in:
Denis 2014-10-10 12:06:14 +03:00
parent 45f266b1bc
commit 90b4c7f8f7

View file

@ -111,6 +111,8 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
}; };
registerListPreference(settings.ARRIVAL_DISTANCE_FACTOR, screen, arrivalNames, arrivalValues); registerListPreference(settings.ARRIVAL_DISTANCE_FACTOR, screen, arrivalNames, arrivalValues);
ApplicationMode mode = getMyApplication().getSettings().getApplicationMode();
if (mode == ApplicationMode.CAR || mode == ApplicationMode.TRUCK || mode == ApplicationMode.MOTORCYCLE){
Float[] speedLimits = new Float[] {5f, 7f, 10f, 15f, 20f}; Float[] speedLimits = new Float[] {5f, 7f, 10f, 15f, 20f};
if (settings.METRIC_SYSTEM.get() == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS){ if (settings.METRIC_SYSTEM.get() == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS){
@ -130,7 +132,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
speedLimits[4] + " " + getString(R.string.mile_per_hour)}; speedLimits[4] + " " + getString(R.string.mile_per_hour)};
registerListPreference(settings.SPEED_LIMIT_EXCEED, screen, speedNames, speedLimits); registerListPreference(settings.SPEED_LIMIT_EXCEED, screen, speedNames, speedLimits);
} }
}
profileDialog(); profileDialog();
} }