remove delete all syncs from preferences

pull/8/head
Felix Prahl-Kamps 2019-10-06 20:30:29 +02:00
parent 827b0f72ef
commit e9176e2a5b
2 changed files with 14 additions and 14 deletions

View File

@ -40,10 +40,10 @@ public class PreferenceActivity extends AppCompatActivity {
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
PreferencesFragment preferencesFragment = new PreferencesFragment();
preferencesFragment.onDeleteAllSyncsListener = preference -> {
preferenceManager.clearUploadInformation();
return true;
};
// preferencesFragment.onDeleteAllSyncsListener = preference -> {
// preferenceManager.clearUploadInformation();
// return true;
// };
fragmentTransaction.add(R.id.fragmentContainer, preferencesFragment, PreferencesFragment.class.getSimpleName());
fragmentTransaction.commit();
@ -57,9 +57,9 @@ public class PreferenceActivity extends AppCompatActivity {
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
setPreferencesFromResource(R.xml.preference_screen_main, rootKey);
Preference deleteAllSyncInfo = findPreference("PREF_DELETE_ALL_SYNCS");
assert deleteAllSyncInfo != null;
deleteAllSyncInfo.setOnPreferenceClickListener(onDeleteAllSyncsListener);
// Preference deleteAllSyncInfo = findPreference("PREF_DELETE_ALL_SYNCS");
// assert deleteAllSyncInfo != null;
// deleteAllSyncInfo.setOnPreferenceClickListener(onDeleteAllSyncsListener);
}
}
}

View File

@ -2,13 +2,13 @@
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/preference_category_general">
<Preference
android:key="PREF_DELETE_ALL_SYNCS"
android:icon="@drawable/ic_delete_forever"
android:title="@string/preference_delete_all_syncs"
android:summary="@string/preference_delete_all_syncs_summary"/>
</PreferenceCategory>
<!-- <PreferenceCategory android:title="@string/preference_category_general">-->
<!-- <Preference-->
<!-- android:key="PREF_DELETE_ALL_SYNCS"-->
<!-- android:icon="@drawable/ic_delete_forever"-->
<!-- android:title="@string/preference_delete_all_syncs"-->
<!-- android:summary="@string/preference_delete_all_syncs_summary"/>-->
<!-- </PreferenceCategory>-->
<PreferenceCategory android:title="@string/preference_category_information">
<Preference