Add controls for third-party cookies.
[PrivacyBrowser.git] / app / src / main / java / com / stoutner / privacybrowser / SettingsActivity.java
index f0f78fffe4c015557a7319e16603a4a427f582f6..4c0a603b39a85ce561c0e11ec1aa9d75564a584b 100644 (file)
 package com.stoutner.privacybrowser;
 
 import android.os.Bundle;
-import android.preference.PreferenceActivity;
+import android.support.v7.app.AppCompatActivity;
 
-// Once the minimum API is >= 11 we can switch from the deprecated PreferenceActivity to using a PreferenceFragment.
-public class SettingsActivity extends PreferenceActivity {
+public class SettingsActivity extends AppCompatActivity {
     @Override
-    // Until minimum API is >= 11 we needs to use the deprecated addPreferenceFromResource from PreferenceActivity.
-    @SuppressWarnings("deprecation")
-    public void onCreate(Bundle savedInstanceState) {
+    protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        addPreferencesFromResource(R.xml.preferences);
+
+        // Display SettingsFragment
+        getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit();
     }
 }