From 6cecd44a70c82115f75711123f70f0f0fdae2171 Mon Sep 17 00:00:00 2001 From: Florian Staine Date: Mon, 26 Jun 2017 14:31:53 +0200 Subject: [PATCH] Remove unused settings --- app/src/main/java/fr/utbm/lo53/p2017/positionningapp/SettingsActivity.java | 71 +---------------------------------------------------------------------- app/src/main/res/xml/pref_data_sync.xml | 21 --------------------- app/src/main/res/xml/pref_general.xml | 29 ----------------------------- app/src/main/res/xml/pref_headers.xml | 10 ---------- app/src/main/res/xml/pref_notification.xml | 27 --------------------------- 5 files changed, 1 insertion(+), 157 deletions(-) delete mode 100644 app/src/main/res/xml/pref_data_sync.xml delete mode 100644 app/src/main/res/xml/pref_notification.xml diff --git a/app/src/main/java/fr/utbm/lo53/p2017/positionningapp/SettingsActivity.java b/app/src/main/java/fr/utbm/lo53/p2017/positionningapp/SettingsActivity.java index 6d8d9a1..19d45ed 100644 --- a/app/src/main/java/fr/utbm/lo53/p2017/positionningapp/SettingsActivity.java +++ b/app/src/main/java/fr/utbm/lo53/p2017/positionningapp/SettingsActivity.java @@ -156,9 +156,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity { */ protected boolean isValidFragment(String fragmentName) { return PreferenceFragment.class.getName().equals(fragmentName) - || GeneralPreferenceFragment.class.getName().equals(fragmentName) - || DataSyncPreferenceFragment.class.getName().equals(fragmentName) - || NotificationPreferenceFragment.class.getName().equals(fragmentName); + || GeneralPreferenceFragment.class.getName().equals(fragmentName); } /** @@ -172,73 +170,6 @@ public class SettingsActivity extends AppCompatPreferenceActivity { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.pref_general); setHasOptionsMenu(true); - - // Bind the summaries of EditText/List/Dialog/Ringtone preferences - // to their values. When their values change, their summaries are - // updated to reflect the new value, per the Android Design - // guidelines. - bindPreferenceSummaryToValue(findPreference("example_text")); - bindPreferenceSummaryToValue(findPreference("example_list")); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - int id = item.getItemId(); - if (id == android.R.id.home) { - startActivity(new Intent(getActivity(), SettingsActivity.class)); - return true; - } - return super.onOptionsItemSelected(item); - } - } - - /** - * This fragment shows notification preferences only. It is used when the - * activity is showing a two-pane settings UI. - */ - @TargetApi(Build.VERSION_CODES.HONEYCOMB) - public static class NotificationPreferenceFragment extends PreferenceFragment { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - addPreferencesFromResource(R.xml.pref_notification); - setHasOptionsMenu(true); - - // Bind the summaries of EditText/List/Dialog/Ringtone preferences - // to their values. When their values change, their summaries are - // updated to reflect the new value, per the Android Design - // guidelines. - bindPreferenceSummaryToValue(findPreference("notifications_new_message_ringtone")); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - int id = item.getItemId(); - if (id == android.R.id.home) { - startActivity(new Intent(getActivity(), SettingsActivity.class)); - return true; - } - return super.onOptionsItemSelected(item); - } - } - - /** - * This fragment shows data and sync preferences only. It is used when the - * activity is showing a two-pane settings UI. - */ - @TargetApi(Build.VERSION_CODES.HONEYCOMB) - public static class DataSyncPreferenceFragment extends PreferenceFragment { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - addPreferencesFromResource(R.xml.pref_data_sync); - setHasOptionsMenu(true); - - // Bind the summaries of EditText/List/Dialog/Ringtone preferences - // to their values. When their values change, their summaries are - // updated to reflect the new value, per the Android Design - // guidelines. - bindPreferenceSummaryToValue(findPreference("sync_frequency")); } @Override diff --git a/app/src/main/res/xml/pref_data_sync.xml b/app/src/main/res/xml/pref_data_sync.xml deleted file mode 100644 index 6bd9192..0000000 --- a/app/src/main/res/xml/pref_data_sync.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - diff --git a/app/src/main/res/xml/pref_general.xml b/app/src/main/res/xml/pref_general.xml index 6a6e981..513c8f2 100644 --- a/app/src/main/res/xml/pref_general.xml +++ b/app/src/main/res/xml/pref_general.xml @@ -1,34 +1,5 @@ - - - - - - - - - -
- -
- diff --git a/app/src/main/res/xml/pref_notification.xml b/app/src/main/res/xml/pref_notification.xml deleted file mode 100644 index e5a319e..0000000 --- a/app/src/main/res/xml/pref_notification.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - -- libgit2 0.21.4