Clean unnecessary settings
This commit is contained in:
parent
369ec67551
commit
31c4328769
1 changed files with 26 additions and 29 deletions
|
@ -38,21 +38,8 @@ public class SettingsRasterMapsActivity extends SettingsBaseActivity {
|
||||||
cat.setTitle(R.string.pref_raster_map);
|
cat.setTitle(R.string.pref_raster_map);
|
||||||
grp.addPreference(cat);
|
grp.addPreference(cat);
|
||||||
|
|
||||||
CheckBoxPreference mapVectorData = createCheckBoxPreference(settings.MAP_ONLINE_DATA,
|
// present on configure map
|
||||||
R.string.map_online_data, R.string.map_online_data_descr);
|
// addTileSourcePrefs(listener, cat);
|
||||||
// final OnPreferenceChangeListener parent = mapVectorData.getOnPreferenceChangeListener();
|
|
||||||
// MapRenderRepositories r = app.getResourceManager().getRenderer();
|
|
||||||
// if(r.isEmpty()){
|
|
||||||
// AccessibleToast.makeText(this, getString(R.string.no_vector_map_loaded), Toast.LENGTH_LONG).show();
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
cat.addPreference(mapVectorData);
|
|
||||||
|
|
||||||
tileSourcePreference = new ListPreference(this);
|
|
||||||
tileSourcePreference.setSummary(R.string.map_tile_source_descr);
|
|
||||||
tileSourcePreference.setTitle(R.string.map_tile_source);
|
|
||||||
tileSourcePreference.setOnPreferenceChangeListener(listener);
|
|
||||||
cat.addPreference(tileSourcePreference);
|
|
||||||
|
|
||||||
cat.addPreference(createCheckBoxPreference(settings.USE_INTERNET_TO_DOWNLOAD_TILES,
|
cat.addPreference(createCheckBoxPreference(settings.USE_INTERNET_TO_DOWNLOAD_TILES,
|
||||||
R.string.use_internet, R.string.use_internet_to_download_tile));
|
R.string.use_internet, R.string.use_internet_to_download_tile));
|
||||||
|
@ -69,18 +56,15 @@ public class SettingsRasterMapsActivity extends SettingsBaseActivity {
|
||||||
entries, intValues, R.string.level_to_switch_vector_raster, R.string.level_to_switch_vector_raster_descr);
|
entries, intValues, R.string.level_to_switch_vector_raster, R.string.level_to_switch_vector_raster_descr);
|
||||||
cat.addPreference(lp);
|
cat.addPreference(lp);
|
||||||
|
|
||||||
// try without, Issue 823:
|
// present on configure map
|
||||||
// int startZoom = 12;
|
// addOverlayPrefs(grp, listener);
|
||||||
// int endZoom = 19;
|
|
||||||
// entries = new String[endZoom - startZoom + 1];
|
}
|
||||||
// Integer[] intValues = new Integer[endZoom - startZoom + 1];
|
|
||||||
// for (int i = startZoom; i <= endZoom; i++) {
|
|
||||||
// entries[i - startZoom] = i + ""; //$NON-NLS-1$
|
|
||||||
// intValues[i - startZoom] = i ;
|
|
||||||
// }
|
|
||||||
// registerListPreference(osmandosmandSettings.MAX_LEVEL_TO_DOWNLOAD_TILE, screen, entries, intValues);
|
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private void addOverlayPrefs(PreferenceScreen grp, OnPreferenceChangeListener listener) {
|
||||||
|
PreferenceCategory cat;
|
||||||
cat = new PreferenceCategory(this);
|
cat = new PreferenceCategory(this);
|
||||||
cat.setTitle(R.string.pref_overlay);
|
cat.setTitle(R.string.pref_overlay);
|
||||||
grp.addPreference(cat);
|
grp.addPreference(cat);
|
||||||
|
@ -102,8 +86,21 @@ public class SettingsRasterMapsActivity extends SettingsBaseActivity {
|
||||||
sp = createSeekBarPreference(settings.MAP_TRANSPARENCY, R.string.map_transparency, R.string.map_transparency_descr,
|
sp = createSeekBarPreference(settings.MAP_TRANSPARENCY, R.string.map_transparency, R.string.map_transparency_descr,
|
||||||
R.string.modify_transparency, 0, 255);
|
R.string.modify_transparency, 0, 255);
|
||||||
cat.addPreference(sp);
|
cat.addPreference(sp);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private void addTileSourcePrefs(OnPreferenceChangeListener listener, PreferenceCategory cat) {
|
||||||
|
CheckBoxPreference mapVectorData = createCheckBoxPreference(settings.MAP_ONLINE_DATA,
|
||||||
|
R.string.map_online_data, R.string.map_online_data_descr);
|
||||||
|
cat.addPreference(mapVectorData);
|
||||||
|
|
||||||
|
tileSourcePreference = new ListPreference(this);
|
||||||
|
tileSourcePreference.setSummary(R.string.map_tile_source_descr);
|
||||||
|
tileSourcePreference.setTitle(R.string.map_tile_source);
|
||||||
|
tileSourcePreference.setOnPreferenceChangeListener(listener);
|
||||||
|
cat.addPreference(tileSourcePreference);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void updateAllSettings() {
|
public void updateAllSettings() {
|
||||||
|
|
Loading…
Reference in a new issue