From 5a9c8ba51bef2f6971f005d956c19d8f11562ff7 Mon Sep 17 00:00:00 2001 From: PeratX <1215714524@qq.com> Date: Wed, 10 May 2017 06:04:10 +0800 Subject: [PATCH] Fixed crash in settings --- .../org/itxtech/daedalus/fragment/SettingsFragment.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/org/itxtech/daedalus/fragment/SettingsFragment.java b/app/src/main/java/org/itxtech/daedalus/fragment/SettingsFragment.java index f45fae2..64aa960 100644 --- a/app/src/main/java/org/itxtech/daedalus/fragment/SettingsFragment.java +++ b/app/src/main/java/org/itxtech/daedalus/fragment/SettingsFragment.java @@ -6,7 +6,9 @@ import android.os.Build; import android.os.Bundle; import android.preference.*; import android.support.design.widget.Snackbar; +import android.view.LayoutInflater; import android.view.View; +import android.view.ViewGroup; import org.itxtech.daedalus.Daedalus; import org.itxtech.daedalus.R; import org.itxtech.daedalus.util.DnsServerHelper; @@ -109,6 +111,12 @@ public class SettingsFragment extends PreferenceFragment { updateAdvancedOptions(advanced.isChecked()); } + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + view = super.onCreateView(inflater, container, savedInstanceState); + return view; + } + private void updateAdvancedOptions(boolean checked) { PreferenceCategory category = (PreferenceCategory) findPreference("settings_advanced"); for (int i = 1; i < category.getPreferenceCount(); i++) {