From 29d1c2616676c55aa30ca687f6823f4ae4a88c9a Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 1 Feb 2016 17:42:36 +0100 Subject: [PATCH] Revert "Preference compat" This reverts commit 8a2ddf6cac8dcf12aa577d3a676bde6ba87ed960. --- app/app.iml | 4 ---- app/build.gradle | 2 -- .../main/java/eu/faircode/netguard/ActivitySettings.java | 2 +- .../main/java/eu/faircode/netguard/FragmentSettings.java | 9 +++------ .../main/java/eu/faircode/netguard/SwitchPreference.java | 3 +-- app/src/main/res/values/styles.xml | 2 -- app/src/main/res/xml/preferences.xml | 2 +- 7 files changed, 6 insertions(+), 18 deletions(-) diff --git a/app/app.iml b/app/app.iml index c452ceed..c8002dfb 100644 --- a/app/app.iml +++ b/app/app.iml @@ -91,10 +91,8 @@ - - @@ -114,8 +112,6 @@ - - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 0c990ba2..eeb343fe 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,7 +56,5 @@ dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.1.+' compile 'com.android.support:recyclerview-v7:23.1.+' - compile 'com.android.support:preference-v7:23.1.+' - compile 'com.h6ah4i.android.compat:mulsellistprefcompat:1.0.0' // Google come on ... compile 'com.squareup.picasso:picasso:2.5.+' } diff --git a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java index 69f31c64..a3601777 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java +++ b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java @@ -101,7 +101,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere protected void onCreate(Bundle savedInstanceState) { Util.setTheme(this); super.onCreate(savedInstanceState); - getSupportFragmentManager().beginTransaction().replace(android.R.id.content, new FragmentSettings()).commit(); + getFragmentManager().beginTransaction().replace(android.R.id.content, new FragmentSettings()).commit(); getSupportActionBar().setTitle(R.string.menu_settings); } diff --git a/app/src/main/java/eu/faircode/netguard/FragmentSettings.java b/app/src/main/java/eu/faircode/netguard/FragmentSettings.java index e3b53954..354fcf83 100644 --- a/app/src/main/java/eu/faircode/netguard/FragmentSettings.java +++ b/app/src/main/java/eu/faircode/netguard/FragmentSettings.java @@ -20,16 +20,13 @@ package eu.faircode.netguard; */ import android.os.Bundle; -import android.support.v7.preference.PreferenceFragmentCompat; +import android.preference.PreferenceFragment; + +public class FragmentSettings extends PreferenceFragment { -public class FragmentSettings extends PreferenceFragmentCompat { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - } - - @Override - public void onCreatePreferences(Bundle bundle, String s) { addPreferencesFromResource(R.xml.preferences); } } diff --git a/app/src/main/java/eu/faircode/netguard/SwitchPreference.java b/app/src/main/java/eu/faircode/netguard/SwitchPreference.java index ab6de01d..e37c2bfb 100644 --- a/app/src/main/java/eu/faircode/netguard/SwitchPreference.java +++ b/app/src/main/java/eu/faircode/netguard/SwitchPreference.java @@ -20,12 +20,11 @@ package eu.faircode.netguard; */ import android.content.Context; -import android.support.v7.preference.SwitchPreferenceCompat; import android.util.AttributeSet; // https://code.google.com/p/android/issues/detail?id=26194 -public class SwitchPreference extends SwitchPreferenceCompat { +public class SwitchPreference extends android.preference.SwitchPreference { public SwitchPreference(Context context) { this(context, null); } diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 573cf86f..dcc201e1 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -5,12 +5,10 @@