]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/SettingsActivity.java
Add controls for third-party cookies.
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / SettingsActivity.java
index 287237bea587a7ab7f8358778cd94c5712e98e84..4c0a603b39a85ce561c0e11ec1aa9d75564a584b 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * Copyright 2016 Soren Stoutner <soren@stoutner.com>.
  *
- * This file is part of Privacy Browser.
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
  *
  * Privacy Browser is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 package com.stoutner.privacybrowser;
 
 import android.os.Bundle;
-import android.preference.PreferenceActivity;
-import android.support.v7.widget.Toolbar;
+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 minumum 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();
     }
 }