diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-03-28 14:43:47 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-03-28 14:43:47 +0000 |
commit | a5a5e6dac24ad08cf57abfcf16551832265fa425 (patch) | |
tree | 68c6709901a54c92947599c1288fc3a8c0a05502 /app/src/main/java/ml/docilealligator/infinityforreddit | |
parent | b1d5be17cdfc2c396cf4de40167233f25a1dcda5 (diff) | |
download | infinity-for-reddit-a5a5e6dac24ad08cf57abfcf16551832265fa425.tar infinity-for-reddit-a5a5e6dac24ad08cf57abfcf16551832265fa425.tar.gz infinity-for-reddit-a5a5e6dac24ad08cf57abfcf16551832265fa425.tar.bz2 infinity-for-reddit-a5a5e6dac24ad08cf57abfcf16551832265fa425.tar.lz infinity-for-reddit-a5a5e6dac24ad08cf57abfcf16551832265fa425.tar.xz infinity-for-reddit-a5a5e6dac24ad08cf57abfcf16551832265fa425.tar.zst infinity-for-reddit-a5a5e6dac24ad08cf57abfcf16551832265fa425.zip |
Add some advanced preferences which do nothing right now.
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
2 files changed, 30 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AdvancedPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AdvancedPreferenceFragment.java new file mode 100644 index 00000000..7af72c72 --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/AdvancedPreferenceFragment.java @@ -0,0 +1,26 @@ +package ml.docilealligator.infinityforreddit.Settings; + +import android.os.Bundle; + +import androidx.fragment.app.Fragment; +import androidx.preference.Preference; +import androidx.preference.PreferenceFragmentCompat; + +import ml.docilealligator.infinityforreddit.R; +import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; + +/** + * A simple {@link Fragment} subclass. + */ +public class AdvancedPreferenceFragment extends PreferenceFragmentCompat { + + @Override + public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { + setPreferencesFromResource(R.xml.advanced_preferences, rootKey); + + Preference deleteSubredditsPreference = findPreference(SharedPreferencesUtils.DELETE_ALL_SUBREDDITS_DATA_IN_DATABASE); + Preference deleteUsersPreference = findPreference(SharedPreferencesUtils.DELETE_ALL_USERS_DATA_IN_DATABASE); + Preference deleteSortTypePreference = findPreference(SharedPreferencesUtils.DELETE_ALL_SORT_TYPE_DATA_IN_DATABASE); + Preference deletePostLaoutPreference = findPreference(SharedPreferencesUtils.DELETE_ALL_POST_LAYOUT_DATA_IN_DATABASE); + } +} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java index 11613fdb..c10b83fc 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java @@ -81,4 +81,8 @@ public class SharedPreferencesUtils { public static final String CUSTOMIZE_DARK_THEME = "customize_dark_theme"; public static final String CUSTOMIZE_AMOLED_THEME = "customize_amoled_theme"; public static final String MANAGE_THEMES = "manage_themes"; + public static final String DELETE_ALL_SUBREDDITS_DATA_IN_DATABASE= "delete_all_subreddits_data_in_database"; + public static final String DELETE_ALL_USERS_DATA_IN_DATABASE= "delete_all_users_data_in_database"; + public static final String DELETE_ALL_SORT_TYPE_DATA_IN_DATABASE= "delete_all_sort_type_data_in_database"; + public static final String DELETE_ALL_POST_LAYOUT_DATA_IN_DATABASE= "delete_all_post_layout_data_in_database"; } |