diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NavigationDrawerPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NavigationDrawerPreferenceFragment.java new file mode 100644 index 00000000..85751e38 --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NavigationDrawerPreferenceFragment.java @@ -0,0 +1,19 @@ +package ml.docilealligator.infinityforreddit.settings; + +import android.os.Bundle; + +import androidx.preference.PreferenceFragmentCompat; +import androidx.preference.PreferenceManager; + +import ml.docilealligator.infinityforreddit.R; +import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils; + +public class NavigationDrawerPreferenceFragment extends PreferenceFragmentCompat { + + @Override + public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { + PreferenceManager preferenceManager = getPreferenceManager(); + preferenceManager.setSharedPreferencesName(SharedPreferencesUtils.NAVIGATION_DRAWER_SHARED_PREFERENCES_FILE); + setPreferencesFromResource(R.xml.navigation_drawer_preferences, rootKey); + } +} \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 414087ae..986e5376 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -547,6 +547,12 @@ Restore Settings Love Animation Swipe Between Posts + Navigation Drawer + Collapse Account Section + Collapse Post Section + Collapse Preferences Section + Collapse Favorite Subreddits Section + Collapse Subscribed Subreddits Section Cannot get the link diff --git a/app/src/main/res/xml/interface_preferences.xml b/app/src/main/res/xml/interface_preferences.xml index e40f5b25..1d45da42 100644 --- a/app/src/main/res/xml/interface_preferences.xml +++ b/app/src/main/res/xml/interface_preferences.xml @@ -13,6 +13,10 @@ app:fragment="ml.docilealligator.infinityforreddit.settings.ImmersiveInterfacePreferenceFragment" app:isPreferenceVisible="false" /> + + + + + + + + + + + + + + + + + \ No newline at end of file