From fd906cd36b3a9b84b8d5938fff33e7d2bd06576f Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 11 Apr 2016 14:31:15 +0200 Subject: [PATCH] Wrap preference categories in preference screens --- .../faircode/netguard/ActivitySettings.java | 3 +- app/src/main/res/xml-v14/preferences.xml | 506 +++++++++--------- app/src/main/res/xml-v21/preferences.xml | 506 +++++++++--------- 3 files changed, 526 insertions(+), 489 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java index 7eb208e6..56a62175 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java +++ b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java @@ -130,6 +130,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere PreferenceCategory cat_advanced = (PreferenceCategory) screen.findPreference("category_advanced_options"); PreferenceCategory cat_backup = (PreferenceCategory) screen.findPreference("category_backup"); PreferenceCategory cat_development = (PreferenceCategory) screen.findPreference("category_development"); + PreferenceScreen screen_development = (PreferenceScreen) screen.findPreference("screen_development"); // Handle auto enable Preference pref_auto_enable = screen.findPreference("auto_enable"); @@ -342,7 +343,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere // Development Preference pref_show_resolved = screen.findPreference("show_resolved"); if (!(Util.isDebuggable(this) || Util.getSelfVersionName(this).contains("beta"))) { - screen.removePreference(cat_development); + screen.removePreference(screen_development); prefs.edit().remove("loglevel").apply(); } else if (!Util.isDebuggable(this)) cat_development.removePreference(pref_show_resolved); diff --git a/app/src/main/res/xml-v14/preferences.xml b/app/src/main/res/xml-v14/preferences.xml index dc6989ec..3344a46f 100644 --- a/app/src/main/res/xml-v14/preferences.xml +++ b/app/src/main/res/xml-v14/preferences.xml @@ -1,255 +1,273 @@ - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + - - - - - - - + + + + + + + + + - - - - + + + + + - - - - - + + + + + + + diff --git a/app/src/main/res/xml-v21/preferences.xml b/app/src/main/res/xml-v21/preferences.xml index 5acaa942..4ebd51a4 100644 --- a/app/src/main/res/xml-v21/preferences.xml +++ b/app/src/main/res/xml-v21/preferences.xml @@ -1,255 +1,273 @@ - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + - - - - - - - + + + + + + + + + - - - - + + + + + - - - - - + + + + + + +