summaryrefslogtreecommitdiff
path: root/app/java/src/SettingsActivity.java
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-05-14 23:00:00 +0200
committerDaniel Weipert <code@drogueronin.de>2023-05-14 23:00:00 +0200
commit08b40e81c62420e977e82189482fc07c0d6ace31 (patch)
tree59848b81e4c24945a35846f42215c336aaeb13ae /app/java/src/SettingsActivity.java
parentde738691db03ff61bf292b75bfa716b75fe34af1 (diff)
menu / settings
Diffstat (limited to 'app/java/src/SettingsActivity.java')
-rw-r--r--app/java/src/SettingsActivity.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/app/java/src/SettingsActivity.java b/app/java/src/SettingsActivity.java
index 83e2661..c71693a 100644
--- a/app/java/src/SettingsActivity.java
+++ b/app/java/src/SettingsActivity.java
@@ -12,6 +12,10 @@ import android.net.VpnService;
import android.os.Bundle;
+import android.preference.MultiSelectListPreference;
+import android.preference.PreferenceActivity;
+import android.preference.PreferenceFragment;
+
import android.util.Log;
import android.view.Menu;
@@ -24,13 +28,17 @@ import android.widget.Button;
import android.widget.Toast;
import android.provider.Settings;
-public class SettingsActivity extends Activity {
+import java.util.List;
+
+public class SettingsActivity extends PreferenceActivity {
+
+ private MultiSelectListPreference knownSsids;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setContentView(R.layout.settings);
+ getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit();
// if (setting.get(USE_WIFI_LISTENER))
// requestPermissions(new String[]{
@@ -38,4 +46,14 @@ public class SettingsActivity extends Activity {
// }, 1234);
// startService(WifiListenerService);
}
+
+ public static class SettingsFragment extends PreferenceFragment {
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ addPreferencesFromResource(R.xml.settings);
+ }
+ }
}