fix values for miles/feets
This commit is contained in:
parent
597a3518fe
commit
640fb6af3d
1 changed files with 11 additions and 1 deletions
|
@ -235,7 +235,17 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupSelectRouteRecalcDistance(PreferenceScreen screen) {
|
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];
|
String[] entries = new String[entryValues.length];
|
||||||
entries[0] = getString(R.string.shared_string_not_selected);
|
entries[0] = getString(R.string.shared_string_not_selected);
|
||||||
for (int i = 1; i < entryValues.length; i++) {
|
for (int i = 1; i < entryValues.length; i++) {
|
||||||
|
|
Loading…
Reference in a new issue