summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2017-08-16 04:34:14 -0500
committerSamuel Holland <samuel@sholland.org>2017-08-16 04:34:14 -0500
commit6c280f09d2fb36572d1d0f96156030f152d15727 (patch)
tree2c993f3eb3f790a8282bb2a911e25c1b42e4d4dd /app/src/main/java/com
parent5c30cd0a82a64949c017e2d5ea807d68873bb766 (diff)
SettingsActivity: Implement primary config setting
Diffstat (limited to 'app/src/main/java/com')
-rw-r--r--app/src/main/java/com/wireguard/android/SettingsActivity.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/SettingsActivity.java b/app/src/main/java/com/wireguard/android/SettingsActivity.java
index 44e9b9b3..6fa3f897 100644
--- a/app/src/main/java/com/wireguard/android/SettingsActivity.java
+++ b/app/src/main/java/com/wireguard/android/SettingsActivity.java
@@ -1,6 +1,23 @@
package com.wireguard.android;
import android.app.Activity;
+import android.app.FragmentTransaction;
+import android.os.Bundle;
+import android.preference.PreferenceFragment;
public class SettingsActivity extends Activity {
+ @Override
+ protected void onCreate(final Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ final FragmentTransaction transaction = getFragmentManager().beginTransaction();
+ transaction.replace(android.R.id.content, new SettingsFragment()).commit();
+ }
+
+ public static class SettingsFragment extends PreferenceFragment {
+ @Override
+ public void onCreate(final Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ addPreferencesFromResource(R.xml.preferences);
+ }
+ }
}