From 1d251492b08ca17852e4a8bb5b0a9638443da9b2 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Thu, 15 Dec 2022 23:18:14 +0100 Subject: Add support for Material You tinted theme --- .../de/danoeh/antennapod/storage/preferences/UserPreferences.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'storage/preferences/src') diff --git a/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java b/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java index 56c8975da..895d0ab6f 100644 --- a/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java +++ b/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java @@ -48,6 +48,7 @@ public class UserPreferences { // User Interface public static final String PREF_THEME = "prefTheme"; + public static final String PREF_TINTED_COLORS = "prefTintedColors"; public static final String PREF_HIDDEN_DRAWER_ITEMS = "prefHiddenDrawerItems"; public static final String PREF_DRAWER_FEED_ORDER = "prefDrawerFeedOrder"; public static final String PREF_DRAWER_FEED_COUNTER = "prefDrawerFeedIndicator"; @@ -170,6 +171,10 @@ public class UserPreferences { } } + public static boolean getIsThemeColorTinted() { + return Build.VERSION.SDK_INT >= 31 && prefs.getBoolean(PREF_TINTED_COLORS, false); + } + public static List getHiddenDrawerItems() { String hiddenItems = prefs.getString(PREF_HIDDEN_DRAWER_ITEMS, ""); return new ArrayList<>(Arrays.asList(TextUtils.split(hiddenItems, ","))); -- cgit v1.2.3