Clean unnecessary settings

This commit is contained in:
Victor Shcherb 2015-05-21 15:30:35 +03:00
parent 369ec67551
commit 31c4328769

View file

@ -38,21 +38,8 @@ public class SettingsRasterMapsActivity extends SettingsBaseActivity {
cat.setTitle(R.string.pref_raster_map);
grp.addPreference(cat);
CheckBoxPreference mapVectorData = createCheckBoxPreference(settings.MAP_ONLINE_DATA,
R.string.map_online_data, R.string.map_online_data_descr);
// 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);
// present on configure map
// addTileSourcePrefs(listener, cat);
cat.addPreference(createCheckBoxPreference(settings.USE_INTERNET_TO_DOWNLOAD_TILES,
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);
cat.addPreference(lp);
// try without, Issue 823:
// int startZoom = 12;
// 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);
// present on configure map
// addOverlayPrefs(grp, listener);
}
@SuppressWarnings("unused")
private void addOverlayPrefs(PreferenceScreen grp, OnPreferenceChangeListener listener) {
PreferenceCategory cat;
cat = new PreferenceCategory(this);
cat.setTitle(R.string.pref_overlay);
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,
R.string.modify_transparency, 0, 255);
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() {