aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Settings.java
diff options
context:
space:
mode:
authorrsudev <rasch@munin-soft.de>2012-03-30 23:38:39 +0200
committerrsudev <rasch@munin-soft.de>2012-03-30 23:38:39 +0200
commitef0ca671bf6be797c1863df923ab4e1de5ccdbcc (patch)
tree5aba1a1a8e960e341428a54f6b0d7876af095eea /main/src/cgeo/geocaching/Settings.java
parent5da34a1b4ae61d7fd34cd32f56a0eaa88caad4c5 (diff)
downloadcgeo-ef0ca671bf6be797c1863df923ab4e1de5ccdbcc.zip
cgeo-ef0ca671bf6be797c1863df923ab4e1de5ccdbcc.tar.gz
cgeo-ef0ca671bf6be797c1863df923ab4e1de5ccdbcc.tar.bz2
Live map info popup
Diffstat (limited to 'main/src/cgeo/geocaching/Settings.java')
-rw-r--r--main/src/cgeo/geocaching/Settings.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/Settings.java b/main/src/cgeo/geocaching/Settings.java
index 4949b62..cfce499 100644
--- a/main/src/cgeo/geocaching/Settings.java
+++ b/main/src/cgeo/geocaching/Settings.java
@@ -79,6 +79,8 @@ public final class Settings {
private static final String KEY_DEFAULT_NAVIGATION_TOOL = "defaultNavigationTool";
private static final String KEY_DEFAULT_NAVIGATION_TOOL_2 = "defaultNavigationTool2";
private static final String KEY_LIVE_MAP_STRATEGY = "livemapstrategy";
+ private static final String KEY_HIDE_LIVE_MAP_HINT = "hidelivemaphint";
+ private static final String KEY_LIVE_MAP_HINT_SHOW_COUNT = "livemaphintshowcount";
private final static int unitsMetric = 1;
private final static int unitsImperial = 2;
@@ -1015,4 +1017,31 @@ public final class Settings {
});
}
+ public static boolean getHideLiveMapHint() {
+ return sharedPrefs.getInt(KEY_HIDE_LIVE_MAP_HINT, 0) == 0 ? false : true;
+ }
+
+ public static void setHideLiveHint(final boolean hide) {
+ editSharedSettings(new PrefRunnable() {
+
+ @Override
+ public void edit(Editor edit) {
+ edit.putInt(KEY_HIDE_LIVE_MAP_HINT, hide ? 1 : 0);
+ }
+ });
+ }
+
+ public static int getLiveMapHintShowCount() {
+ return sharedPrefs.getInt(KEY_LIVE_MAP_HINT_SHOW_COUNT, 0);
+ }
+
+ public static void setLiveMapHintShowCount(final int showCount) {
+ editSharedSettings(new PrefRunnable() {
+
+ @Override
+ public void edit(Editor edit) {
+ edit.putInt(KEY_LIVE_MAP_HINT_SHOW_COUNT, showCount);
+ }
+ });
+ }
}