Commit 4140dd60 authored by Grigory Fedorov's avatar Grigory Fedorov

Settings orientation change crash fixed (initialization of fragment moved to...

Settings orientation change crash fixed (initialization of fragment moved to onCreateView from onCreate).
parent eb44c19c
......@@ -9,6 +9,9 @@ import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceScreen;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.xabber.android.ui.helper.PreferenceSummaryHelper;
import com.xabber.android.ui.widget.RingtonePreference;
......@@ -20,8 +23,8 @@ public abstract class BaseSettingsFragment extends PreferenceFragment
implements Preference.OnPreferenceChangeListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = super.onCreateView(inflater, container, savedInstanceState);
onInflate(savedInstanceState);
......@@ -42,6 +45,8 @@ public abstract class BaseSettingsFragment extends PreferenceFragment
onPreferenceChange(preference,
((ListPreference) preference).getValue());
}
return view;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment