aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/settings
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2014-05-18 07:57:12 +0200
committerBananeweizen <bananeweizen@gmx.de>2014-05-18 07:57:12 +0200
commit5fcce648e200669f1ae0875c7aea9dc3a4a37574 (patch)
treef3741fdf0c8fcb6e6728fa49d61af7ea6c7f1aaa /main/src/cgeo/geocaching/settings
parent6b2972bfd1fdc14cd84f78e3674e97b46675345d (diff)
parent786eccacbb285696d504d08ba02c61400ce063a2 (diff)
downloadcgeo-5fcce648e200669f1ae0875c7aea9dc3a4a37574.zip
cgeo-5fcce648e200669f1ae0875c7aea9dc3a4a37574.tar.gz
cgeo-5fcce648e200669f1ae0875c7aea9dc3a4a37574.tar.bz2
Merge remote-tracking branch 'schwabe/actionbar_pullrequest'
Conflicts: main/res/values/preference_keys.xml main/src/cgeo/geocaching/CgeoApplication.java
Diffstat (limited to 'main/src/cgeo/geocaching/settings')
-rw-r--r--main/src/cgeo/geocaching/settings/Settings.java4
-rw-r--r--main/src/cgeo/geocaching/settings/SettingsActivity.java11
2 files changed, 15 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/settings/Settings.java b/main/src/cgeo/geocaching/settings/Settings.java
index 7a4dfdd..a527fc5 100644
--- a/main/src/cgeo/geocaching/settings/Settings.java
+++ b/main/src/cgeo/geocaching/settings/Settings.java
@@ -557,6 +557,10 @@ public class Settings {
return getBoolean(R.string.pref_units, getImperialUnitsDefault());
}
+ public static boolean isAlwaysShowOverlfowMenu() {
+ return getBoolean(R.string.pref_alwaysshowoverflowmenu, false);
+ }
+
static boolean getImperialUnitsDefault() {
final String countryCode = Locale.getDefault().getCountry();
return "US".equals(countryCode) // USA
diff --git a/main/src/cgeo/geocaching/settings/SettingsActivity.java b/main/src/cgeo/geocaching/settings/SettingsActivity.java
index 8f9aad4..315c73a 100644
--- a/main/src/cgeo/geocaching/settings/SettingsActivity.java
+++ b/main/src/cgeo/geocaching/settings/SettingsActivity.java
@@ -91,8 +91,19 @@ public class SettingsActivity extends PreferenceActivity {
SettingsActivity.addPreferencesFromResource(this, R.xml.preferences);
initPreferences();
+ /* Remove the show overflow preference on Android version where the platform always or never
+ * shows the overflow menu and the app cannot influence the behaviour
+ */
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB || Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR2) {
+ Preference pref = findPreference(this, getString(R.string.pref_alwaysshowoverflowmenu));
+ PreferenceScreen appearence = (PreferenceScreen) findPreference(this, getString(R.string.pref_appearance));
+ appearence.removePreference(pref);
+
+ }
Intent intent = getIntent();
openInitialScreen(intent.getIntExtra(INTENT_OPEN_SCREEN, 0));
+
+
}
private void openInitialScreen(int initialScreen) {