fix values for miles/feets

This commit is contained in:
MadWasp79 2020-02-13 17:07:18 +02:00
parent 597a3518fe
commit 640fb6af3d

View file

@ -235,7 +235,17 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
}
private void setupSelectRouteRecalcDistance(PreferenceScreen screen) {
Float[] entryValues = new Float[] {-1.0f, 10.f, 20.0f, 30.0f, 50.0f, 100.0f, 200.0f, 500.0f, 1000.0f, 1500.0f};
Float[] entryValues;
OsmandSettings settings = app.getSettings();
OsmandSettings.MetricsConstants mc = settings.METRIC_SYSTEM.get();
if (mc == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS) {
entryValues = new Float[] {-1.0f, 10.f, 20.0f, 30.0f, 50.0f, 100.0f, 200.0f, 500.0f, 1000.0f, 1500.0f};
} else {
entryValues = new Float[] {-1.0f, 9.1f, 18.3f, 30.5f, 45.7f, 91.5f, 183.0f, 482.0f, 965.0f, 1609.0f};
}
String[] entries = new String[entryValues.length];
entries[0] = getString(R.string.shared_string_not_selected);
for (int i = 1; i < entryValues.length; i++) {