From a80435a03becc7ae874541dec77594caca4e11d0 Mon Sep 17 00:00:00 2001 From: pachecosf Date: Fri, 18 Jan 2019 12:09:24 -0800 Subject: switched implementation to ussing attr --- .../de/danoeh/antennapod/core/util/ThemeUtils.java | 32 ---------------------- core/src/main/res/values/attrs.xml | 1 + core/src/main/res/values/colors.xml | 4 +-- core/src/main/res/values/styles.xml | 10 +++++-- 4 files changed, 11 insertions(+), 36 deletions(-) (limited to 'core') diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java index dd03f0176..14f091249 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/ThemeUtils.java @@ -29,38 +29,6 @@ public class ThemeUtils { } } - public static int getSelectionDrawerActivatedColor() { - int theme = UserPreferences.getTheme(); - if (theme == R.style.Theme_AntennaPod_Dark) { - return R.color.overlay_dark; - } else if (theme == R.style.Theme_AntennaPod_TrueBlack){ - return R.color.highlight_trueblack; - } else if (theme == R.style.Theme_AntennaPod_Light) { - return R.color.highlight_light; - } else { - Log.e(TAG, - "getSelectionDrawerActivatedColor could not match the current theme to any color!"); - return R.color.highlight_light; - } - - } - - public static int getSelectionDrawerNotActivatedColor() { - int theme = UserPreferences.getTheme(); - if (theme == R.style.Theme_AntennaPod_Dark) { - return R.color.darktheme_drawer; - } else if (theme == R.style.Theme_AntennaPod_TrueBlack){ - return R.color.black; - } else if (theme == R.style.Theme_AntennaPod_Light) { - return R.color.primary_light; - } else { - Log.e(TAG, - "getSelectionDrawerNotActivatedColor could not match the current theme to any color!"); - return R.color.highlight_light; - } - } - - public static @ColorInt int getColorFromAttr(Context context, @AttrRes int attr) { TypedValue typedValue = new TypedValue(); context.getTheme().resolveAttribute(attr, typedValue, true); diff --git a/core/src/main/res/values/attrs.xml b/core/src/main/res/values/attrs.xml index 16a6d9185..48e55768e 100644 --- a/core/src/main/res/values/attrs.xml +++ b/core/src/main/res/values/attrs.xml @@ -67,6 +67,7 @@ + diff --git a/core/src/main/res/values/colors.xml b/core/src/main/res/values/colors.xml index 75c3169fb..5d820f3cf 100644 --- a/core/src/main/res/values/colors.xml +++ b/core/src/main/res/values/colors.xml @@ -29,8 +29,8 @@ #FFFFFF #212121 - #3B3B3B - + #3B3B3B + #212121 #DDDDDD #414141 #414141 diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml index 79773619f..363a69a63 100644 --- a/core/src/main/res/values/styles.xml +++ b/core/src/main/res/values/styles.xml @@ -43,6 +43,7 @@ @drawable/ic_drag_vertical_grey600_48dp @color/white @color/white + @color/highlight_light @drawable/ic_new_releases_grey600_24dp @drawable/ic_history_grey600_24dp @drawable/ic_folder_grey600_24dp @@ -125,7 +126,8 @@ @drawable/overlay_drawable_dark @drawable/ic_drag_vertical_white_48dp @color/black - #3B3B3B + @color/nav_drawer_background_dark + @color/nav_drawer_highlighted_dark @drawable/ic_new_releases_white_24dp @drawable/ic_history_white_24dp @drawable/ic_folder_white_24dp @@ -175,6 +177,7 @@ @drawable/ic_drag_vertical_white_48dp @color/black @color/black + @color/highlight_trueblack @color/white @color/white @color/black @@ -228,6 +231,7 @@ @drawable/ic_drag_vertical_grey600_48dp @color/white @color/white + @color/highlight_light @drawable/ic_new_releases_grey600_24dp @drawable/ic_history_grey600_24dp @drawable/ic_folder_grey600_24dp @@ -309,7 +313,8 @@ @drawable/overlay_drawable_dark @drawable/ic_drag_vertical_white_48dp @color/black - #3B3B3B + @color/nav_drawer_background_dark + @color/nav_drawer_highlighted_dark @drawable/ic_new_releases_white_24dp @drawable/ic_history_white_24dp @drawable/ic_folder_white_24dp @@ -359,6 +364,7 @@ @drawable/ic_drag_vertical_white_48dp @color/black @color/black + @color/highlight_trueblack @color/highlight_trueblack @color/white @color/white -- cgit v1.2.3