diff options
author | Samuel Holland <samuel@sholland.org> | 2017-08-16 04:34:14 -0500 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2017-08-16 04:34:14 -0500 |
commit | 08992185ecfe359ae7607a779b984fc6c3b8b22b (patch) | |
tree | 2c993f3eb3f790a8282bb2a911e25c1b42e4d4dd /app/src/main/java/com | |
parent | e95b41e48b7f335c08833a2e9bab0902d1ce98f8 (diff) |
SettingsActivity: Implement primary config setting
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com')
-rw-r--r-- | app/src/main/java/com/wireguard/android/SettingsActivity.java | 17 |
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); + } + } } |