From d79ce9f05353ee028c45e5078bb0bb28a5fc8f7b Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 26 May 2012 15:38:47 +0200 Subject: [PATCH] Fix seek bar preference --- OsmAnd/res/values/strings.xml | 2 +- OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 4b90e58cb3..0b26e29459 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -8,6 +8,7 @@ If you are making/correcting english translations make sure : 1. All your modified/created strings are in the top of the file (to make easier find what's translated). --> + Modify transparency (0 - transparent, 255 - opaque) Do you want to interrupt file downloading? To use the major features of this application, you need some regional offline data, which you can download (use Settings, Offline Data). Afterwards, you will be able to search by address, look up POIs and find public transportation. Basemap is required for proper application functioning and was selected to download. @@ -442,7 +443,6 @@ Overlay transparency Modify base map transparency Base map transparency - Modify transparency Underlay map… Underlay map Choose underlay map diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java index 6b12eaca94..de3524d0e9 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java @@ -95,6 +95,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference public CheckBoxPreference createCheckBoxPreference(OsmandPreference b, int title, int summary){ CheckBoxPreference p = new CheckBoxPreference(this); p.setTitle(title); + p.setKey(b.getId()); p.setSummary(summary); p.setOnPreferenceChangeListener(this); screenPreferences.put(b.getId(), p); @@ -113,6 +114,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference int defValue, int maxValue){ SeekBarPreference p = new SeekBarPreference(this, dialogTextId, defValue, maxValue); p.setTitle(title); + p.setKey(b.getId()); p.setSummary(summary); p.setOnPreferenceChangeListener(this); screenPreferences.put(b.getId(), p); @@ -128,6 +130,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference public ListPreference createListPreference(OsmandPreference b, String[] names, T[] values, int title, int summary){ ListPreference p = new ListPreference(this); p.setTitle(title); + p.setKey(b.getId()); p.setDialogTitle(title); p.setSummary(summary); prepareListPreference(b, names, values, p); @@ -156,6 +159,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference public EditTextPreference createEditTextPreference(OsmandPreference b, int title, int summary){ EditTextPreference p = new EditTextPreference(this); p.setTitle(title); + p.setKey(b.get()); p.setDialogTitle(title); p.setSummary(summary); p.setOnPreferenceChangeListener(this);