wireguard-android/app/src/main/java/com/wireguard/android/SettingsActivity.java
Samuel Holland 08992185ec SettingsActivity: Implement primary config setting
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-16 04:34:14 -05:00

24 lines
801 B
Java

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);
}
}
}