Add settings for rotate and application mode back
This commit is contained in:
parent
e9adad5df9
commit
d8d97552c1
2 changed files with 16 additions and 14 deletions
|
@ -12,6 +12,8 @@
|
||||||
<!-- <PreferenceCategory android:title="@string/global_settings" android:key="global_settings" > -->
|
<!-- <PreferenceCategory android:title="@string/global_settings" android:key="global_settings" > -->
|
||||||
<PreferenceScreen android:key="general_settings" android:title="@string/general_settings" android:summary="@string/general_settings_descr">
|
<PreferenceScreen android:key="general_settings" android:title="@string/general_settings" android:summary="@string/general_settings_descr">
|
||||||
<PreferenceCategory android:title="@string/global_app_settings" android:key="global_app_settings">
|
<PreferenceCategory android:title="@string/global_app_settings" android:key="global_app_settings">
|
||||||
|
<ListPreference android:summary="@string/settings_preset_descr" android:title="@string/settings_preset" android:key="application_mode"></ListPreference>
|
||||||
|
<ListPreference android:key="rotate_map" android:title="@string/rotate_map_to_bearing" android:summary="@string/rotate_map_to_bearing_descr"></ListPreference>
|
||||||
<ListPreference android:key="map_screen_orientation" android:title="@string/map_screen_orientation" android:summary="@string/map_screen_orientation_descr"></ListPreference>
|
<ListPreference android:key="map_screen_orientation" android:title="@string/map_screen_orientation" android:summary="@string/map_screen_orientation_descr"></ListPreference>
|
||||||
<ListPreference android:key="preferred_locale" android:title="@string/preferred_locale" android:summary="@string/preferred_locale_descr"></ListPreference>
|
<ListPreference android:key="preferred_locale" android:title="@string/preferred_locale" android:summary="@string/preferred_locale_descr"></ListPreference>
|
||||||
<CheckBoxPreference android:summary="@string/use_english_names_descr" android:title="@string/use_english_names"
|
<CheckBoxPreference android:summary="@string/use_english_names_descr" android:title="@string/use_english_names"
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
|
||||||
private Preference showAlarms;
|
private Preference showAlarms;
|
||||||
|
|
||||||
private EditTextPreference applicationDir;
|
private EditTextPreference applicationDir;
|
||||||
// private ListPreference applicationModePreference;
|
private ListPreference applicationModePreference;
|
||||||
|
|
||||||
private ListPreference routerServicePreference;
|
private ListPreference routerServicePreference;
|
||||||
|
|
||||||
|
@ -298,9 +298,9 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
|
||||||
|
|
||||||
|
|
||||||
// List preferences
|
// List preferences
|
||||||
// registerListPreference(osmandSettings.ROTATE_MAP, screen,
|
registerListPreference(osmandSettings.ROTATE_MAP, screen,
|
||||||
// new String[]{getString(R.string.rotate_map_none_opt), getString(R.string.rotate_map_bearing_opt), getString(R.string.rotate_map_compass_opt)},
|
new String[]{getString(R.string.rotate_map_none_opt), getString(R.string.rotate_map_bearing_opt), getString(R.string.rotate_map_compass_opt)},
|
||||||
// new Integer[]{OsmandSettings.ROTATE_MAP_NONE, OsmandSettings.ROTATE_MAP_BEARING, OsmandSettings.ROTATE_MAP_COMPASS});
|
new Integer[]{OsmandSettings.ROTATE_MAP_NONE, OsmandSettings.ROTATE_MAP_BEARING, OsmandSettings.ROTATE_MAP_COMPASS});
|
||||||
|
|
||||||
registerListPreference(osmandSettings.MAP_SCREEN_ORIENTATION, screen,
|
registerListPreference(osmandSettings.MAP_SCREEN_ORIENTATION, screen,
|
||||||
new String[] {getString(R.string.map_orientation_portrait), getString(R.string.map_orientation_landscape), getString(R.string.map_orientation_default)},
|
new String[] {getString(R.string.map_orientation_portrait), getString(R.string.map_orientation_landscape), getString(R.string.map_orientation_default)},
|
||||||
|
@ -351,14 +351,14 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
|
||||||
}
|
}
|
||||||
registerListPreference(osmandSettings.ROUTER_SERVICE, screen, entries, RouteService.values());
|
registerListPreference(osmandSettings.ROUTER_SERVICE, screen, entries, RouteService.values());
|
||||||
|
|
||||||
// entries = new String[ApplicationMode.values().length];
|
entries = new String[ApplicationMode.values().length];
|
||||||
// for(int i=0; i<entries.length; i++){
|
for(int i=0; i<entries.length; i++){
|
||||||
// entries[i] = ApplicationMode.values()[i].toHumanString(this);
|
entries[i] = ApplicationMode.values()[i].toHumanString(this);
|
||||||
// }
|
}
|
||||||
// registerListPreference(osmandSettings.APPLICATION_MODE, screen, entries, ApplicationMode.values());
|
registerListPreference(osmandSettings.APPLICATION_MODE, screen, entries, ApplicationMode.values());
|
||||||
//
|
|
||||||
// applicationModePreference = (ListPreference) screen.findPreference(osmandSettings.APPLICATION_MODE.getId());
|
applicationModePreference = (ListPreference) screen.findPreference(osmandSettings.APPLICATION_MODE.getId());
|
||||||
// applicationModePreference.setOnPreferenceChangeListener(this);
|
applicationModePreference.setOnPreferenceChangeListener(this);
|
||||||
|
|
||||||
|
|
||||||
routerServicePreference = (ListPreference) screen.findPreference(osmandSettings.ROUTER_SERVICE.getId());
|
routerServicePreference = (ListPreference) screen.findPreference(osmandSettings.ROUTER_SERVICE.getId());
|
||||||
|
@ -473,8 +473,8 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
|
||||||
|
|
||||||
updateApplicationDirTextAndSummary();
|
updateApplicationDirTextAndSummary();
|
||||||
|
|
||||||
// applicationModePreference.setTitle(getString(R.string.settings_preset) + " ["
|
applicationModePreference.setTitle(getString(R.string.settings_preset) + " ["
|
||||||
// + osmandSettings.APPLICATION_MODE.get().toHumanString(this) + "]");
|
+ osmandSettings.APPLICATION_MODE.get().toHumanString(this) + "]");
|
||||||
routerServicePreference.setSummary(getString(R.string.router_service_descr) + " [" + osmandSettings.ROUTER_SERVICE.get() + "]");
|
routerServicePreference.setSummary(getString(R.string.router_service_descr) + " [" + osmandSettings.ROUTER_SERVICE.get() + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue