diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-03-14 13:26:36 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-03-14 13:26:36 +0000 |
commit | c0937304ccbd5d44c89ecc2b7674355bc24eb755 (patch) | |
tree | 59f3e6ef5b7c6bf4291e6ccff6d6a3cb2ad2a6d4 /app/src/main/java | |
parent | 5811ca9ff01811d3432583e4875cb4cf309294a0 (diff) | |
download | infinity-for-reddit-c0937304ccbd5d44c89ecc2b7674355bc24eb755.tar infinity-for-reddit-c0937304ccbd5d44c89ecc2b7674355bc24eb755.tar.gz infinity-for-reddit-c0937304ccbd5d44c89ecc2b7674355bc24eb755.tar.bz2 infinity-for-reddit-c0937304ccbd5d44c89ecc2b7674355bc24eb755.tar.lz infinity-for-reddit-c0937304ccbd5d44c89ecc2b7674355bc24eb755.tar.xz infinity-for-reddit-c0937304ccbd5d44c89ecc2b7674355bc24eb755.tar.zst infinity-for-reddit-c0937304ccbd5d44c89ecc2b7674355bc24eb755.zip |
Add settings for navigation drawer.
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/settings/NavigationDrawerPreferenceFragment.java | 19 |
1 files changed, 19 insertions, 0 deletions
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 |