Update Countries

This commit is contained in:
Victor Shcherb 2013-08-05 01:45:16 +02:00
parent d8928258ce
commit d1e4a2b321
3 changed files with 13 additions and 2 deletions

View file

@ -14,6 +14,7 @@
<string name="driving_region">Driving Region</string>
<string name="driving_region_japan">Japan</string>
<string name="driving_region_us">United States</string>
<string name="driving_region_canada">Canada</string>
<string name="driving_region_europe_asia">Europe &amp; Asia</string>
<string name="driving_region_uk">UK, India, Australia &amp; Others</string>
<string name="osmodroid_mode_on">Stop OsMoDroid</string>

View file

@ -1520,7 +1520,8 @@ public class OsmandSettings {
public enum DrivingRegion {
EUROPE_ASIA(R.string.driving_region_europe_asia, MetricsConstants.KILOMETERS_AND_METERS, false, false),
US_CANADA(R.string.driving_region_us, MetricsConstants.MILES_AND_FOOTS, false, true),
US(R.string.driving_region_us, MetricsConstants.MILES_AND_FOOTS, false, true),
CANADA(R.string.driving_region_canada, MetricsConstants.KILOMETERS_AND_METERS, false, true),
UK_AND_OTHERS(R.string.driving_region_uk, MetricsConstants.MILES_AND_FOOTS, true, false),
JAPAN(R.string.driving_region_japan, MetricsConstants.KILOMETERS_AND_METERS, true, false)
;

View file

@ -43,6 +43,8 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
private Preference applicationDir;
private ListPreference applicationModePreference;
private ListPreference drivingRegionPreference;
private ListPreference metricsAndConstantsPreference;
@Override
@ -208,7 +210,8 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
applicationModePreference = (ListPreference) screen.findPreference(settings.APPLICATION_MODE.getId());
applicationModePreference.setOnPreferenceChangeListener(this);
drivingRegionPreference = (ListPreference) screen.findPreference(settings.DRIVING_REGION.getId());
metricsAndConstantsPreference = (ListPreference) screen.findPreference(settings.METRIC_SYSTEM.getId());
}
@ -226,6 +229,10 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
applicationModePreference.setTitle(getString(R.string.settings_preset) + " ["
+ settings.APPLICATION_MODE.get().toHumanString(getMyApplication()) + "]");
drivingRegionPreference.setTitle(getString(R.string.driving_region) + " ["
+ getString(settings.DRIVING_REGION.get().name) + "]");
metricsAndConstantsPreference.setTitle(getString(R.string.unit_of_length) + " ["
+ settings.METRIC_SYSTEM.get().toHumanString(getMyApplication()) + "]");
}
@Override
@ -252,6 +259,8 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
Intent intent = getIntent();
finish();
startActivity(intent);
} else {
updateAllSettings();
}
return true;
}