diff options
author | Andrew Dolgov <[email protected]> | 2018-07-10 08:48:05 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-07-10 08:48:05 +0300 |
commit | 191f3786f18b76e4e2b785332c450e454641d75c (patch) | |
tree | db7491402cd96f9c34a2ab3a1acd64bbdb6b873b /org.fox.ttrss/src/main/java/org/fox | |
parent | 30eb8d9363eaf985e3b42b8403a73cfcb72e9c6d (diff) |
move preference click/build info stuff into onCreate
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesFragment.java | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesFragment.java index b4f1ccdc..8816743e 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesFragment.java @@ -19,10 +19,18 @@ public class PreferencesFragment extends PreferenceFragment { // Load the preferences from an XML resource addPreferencesFromResource(R.xml.preferences); - } - - public void onResume() { - super.onResume(); + findPreference("network_settings").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + getFragmentManager() + .beginTransaction() + .replace(R.id.preferences_container, new NetworkPreferencesFragment() ) + .addToBackStack( NetworkPreferencesFragment.class.getSimpleName() ) + .commit(); + + return false; + } + }); try { String version; @@ -43,19 +51,6 @@ public class PreferencesFragment extends PreferenceFragment { findPreference("build_timestamp").setSummary(getString(R.string.prefs_build_timestamp, buildTimestamp)); - findPreference("network_settings").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { - @Override - public boolean onPreferenceClick(Preference preference) { - getFragmentManager() - .beginTransaction() - .replace(R.id.preferences_container, new NetworkPreferencesFragment() ) - .addToBackStack( NetworkPreferencesFragment.class.getSimpleName() ) - .commit(); - - return false; - } - }); - } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } |