mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 04:37:25 +01:00
Add some advanced preferences which do nothing right now.
This commit is contained in:
parent
b1d5be17cd
commit
a5a5e6dac2
@ -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);
|
||||
}
|
||||
}
|
@ -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";
|
||||
}
|
||||
|
@ -366,6 +366,11 @@
|
||||
<string name="settings_customize_amoled_theme_title">Amoled Theme</string>
|
||||
<string name="settings_manage_themes_title">Manage Themes</string>
|
||||
<string name="settings_custom_theme_cannot_apply_to_settings_page_title">Custom themes cannot be applied to settings page (except toolbar, status bar and navigation bar).</string>
|
||||
<string name="settings_advanced_master_title">Advanced</string>
|
||||
<string name="settings_delete_all_subreddits_data_in_database_title">Delete All Subreddits in Database</string>
|
||||
<string name="settings_delete_all_users_data_in_database_title">Delete All Users in Database</string>
|
||||
<string name="settings_delete_all_sort_type_data_in_database_title">Delete All Sort Type in Database</string>
|
||||
<string name="settings_delete_all_post_layout_data_in_database_title">Delete All Post Layout Data in Database</string>
|
||||
|
||||
<string name="no_link_available">Cannot get the link</string>
|
||||
|
||||
@ -638,4 +643,7 @@
|
||||
<string name="color_picker">Color Picker</string>
|
||||
<string name="invalid_color">Invalid Color</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
|
||||
</resources>
|
||||
|
21
app/src/main/res/xml/advanced_preferences.xml
Normal file
21
app/src/main/res/xml/advanced_preferences.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<Preference
|
||||
app:key="delete_all_subreddits_data_in_database"
|
||||
app:title="@string/settings_delete_all_subreddits_data_in_database_title" />
|
||||
|
||||
<Preference
|
||||
app:key="delete_all_users_data_in_database"
|
||||
app:title="@string/settings_delete_all_users_data_in_database_title" />
|
||||
|
||||
<Preference
|
||||
app:key="delete_all_sort_type_data_in_database"
|
||||
app:title="@string/settings_delete_all_sort_type_data_in_database_title" />
|
||||
|
||||
<Preference
|
||||
app:key="delete_all_post_layout_data_in_database"
|
||||
app:title="@string/settings_delete_all_post_layout_data_in_database_title" />
|
||||
|
||||
</PreferenceScreen>
|
@ -66,6 +66,10 @@
|
||||
app:key="blur_spoiler"
|
||||
app:title="@string/settings_blur_spoiler_title" />
|
||||
|
||||
<Preference
|
||||
app:title="@string/settings_advanced_master_title"
|
||||
app:fragment="ml.docilealligator.infinityforreddit.Settings.AdvancedPreferenceFragment" />
|
||||
|
||||
<Preference
|
||||
app:title="@string/settings_about_master_title"
|
||||
app:fragment="ml.docilealligator.infinityforreddit.Settings.AboutPreferenceFragment" />
|
||||
|
Loading…
Reference in New Issue
Block a user