2018-01-01 09:06:37 +01:00
|
|
|
package com.wireguard.android.activity;
|
2017-08-09 14:34:28 +02:00
|
|
|
|
|
|
|
import android.app.Activity;
|
2017-08-16 11:34:14 +02:00
|
|
|
import android.os.Bundle;
|
|
|
|
import android.preference.PreferenceFragment;
|
2017-08-09 14:34:28 +02:00
|
|
|
|
2018-01-01 09:06:37 +01:00
|
|
|
import com.wireguard.android.R;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface for changing application-global persistent settings.
|
|
|
|
*/
|
2017-12-19 02:42:00 +01:00
|
|
|
|
2017-08-09 14:34:28 +02:00
|
|
|
public class SettingsActivity extends Activity {
|
2017-08-16 11:34:14 +02:00
|
|
|
@Override
|
|
|
|
protected void onCreate(final Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
2018-01-01 09:06:37 +01:00
|
|
|
if (getFragmentManager().findFragmentById(android.R.id.content) == null) {
|
|
|
|
getFragmentManager().beginTransaction()
|
2018-01-08 04:45:11 +01:00
|
|
|
.add(android.R.id.content, new SettingsFragment())
|
2018-01-01 09:06:37 +01:00
|
|
|
.commit();
|
|
|
|
}
|
2017-08-16 11:34:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public static class SettingsFragment extends PreferenceFragment {
|
|
|
|
@Override
|
|
|
|
public void onCreate(final Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
addPreferencesFromResource(R.xml.preferences);
|
|
|
|
}
|
|
|
|
}
|
2017-08-09 14:34:28 +02:00
|
|
|
}
|