diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java index 715318db1..33b61b916 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/AllEpisodesRecycleAdapter.java @@ -29,12 +29,12 @@ import de.danoeh.antennapod.activity.MainActivity; import de.danoeh.antennapod.core.feed.FeedItem; import de.danoeh.antennapod.core.feed.FeedMedia; import de.danoeh.antennapod.core.glide.ApGlideSettings; -import de.danoeh.antennapod.core.preferences.UserPreferences; import de.danoeh.antennapod.core.storage.DownloadRequester; import de.danoeh.antennapod.core.util.Converter; import de.danoeh.antennapod.core.util.DateUtils; import de.danoeh.antennapod.core.util.LongList; import de.danoeh.antennapod.core.util.NetworkUtils; +import de.danoeh.antennapod.core.util.ThemeUtils; import de.danoeh.antennapod.fragment.ItemFragment; import de.danoeh.antennapod.menuhandler.FeedItemMenuHandler; @@ -67,11 +67,7 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter { @@ -143,9 +143,7 @@ public class ChaptersListAdapter extends ArrayAdapter { Chapter current = ChapterUtils.getCurrentChapter(media); if (current == sc) { - boolean darkTheme = UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark; - int highlight = darkTheme ? R.color.highlight_dark : R.color.highlight_light; - int playingBackGroundColor = ContextCompat.getColor(getContext(), highlight); + int playingBackGroundColor = ThemeUtils.getColorFromAttr(getContext(), R.attr.currently_playing_background); holder.view.setBackgroundColor(playingBackGroundColor); } else { holder.view.setBackgroundColor(ContextCompat.getColor(getContext(), android.R.color.transparent)); diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java index e29781be1..cf3dd8b09 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java @@ -21,7 +21,6 @@ import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.feed.FeedItem; import de.danoeh.antennapod.core.feed.FeedMedia; import de.danoeh.antennapod.core.feed.MediaType; -import de.danoeh.antennapod.core.preferences.UserPreferences; import de.danoeh.antennapod.core.storage.DownloadRequester; import de.danoeh.antennapod.core.util.DateUtils; import de.danoeh.antennapod.core.util.LongList; @@ -60,11 +59,7 @@ public class FeedItemlistAdapter extends BaseAdapter { this.actionButtonUtils = new ActionButtonUtils(context); this.makePlayedItemsTransparent = makePlayedItemsTransparent; - if(UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) { - playingBackGroundColor = ContextCompat.getColor(context, R.color.highlight_dark); - } else { - playingBackGroundColor = ContextCompat.getColor(context, R.color.highlight_light); - } + playingBackGroundColor = ThemeUtils.getColorFromAttr(context, R.attr.currently_playing_background); normalBackGroundColor = ContextCompat.getColor(context, android.R.color.transparent); } diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java index 01dd4c2de..ee14cb70a 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/QueueRecyclerAdapter.java @@ -25,6 +25,7 @@ import android.widget.TextView; import com.bumptech.glide.Glide; import com.joanzapata.iconify.Iconify; +import de.danoeh.antennapod.core.util.ThemeUtils; import org.apache.commons.lang3.ArrayUtils; import java.lang.ref.WeakReference; @@ -75,11 +76,7 @@ public class QueueRecyclerAdapter extends RecyclerView.Adapter + + + + + + + + + + + + + + diff --git a/core/src/main/res/values-v21/styles.xml b/core/src/main/res/values-v21/styles.xml index 503337c95..c53000c4f 100644 --- a/core/src/main/res/values-v21/styles.xml +++ b/core/src/main/res/values-v21/styles.xml @@ -6,6 +6,19 @@ + + @@ -136,9 +137,31 @@ @drawable/ic_create_new_folder_white_24dp @drawable/ic_cast_disconnect_white_36dp @color/master_switch_background_dark + @color/highlight_dark @style/PreferenceThemeOverlay.v14.Material + + + + + @@ -206,6 +229,7 @@ @drawable/ic_create_new_folder_grey600_24dp @drawable/ic_cast_disconnect_grey600_36dp @color/master_switch_background_light + @color/highlight_light @style/PreferenceThemeOverlay.v14.Material @@ -276,9 +300,32 @@ @drawable/ic_create_new_folder_white_24dp @drawable/ic_cast_disconnect_white_36dp @color/master_switch_background_dark + @color/highlight_dark @style/PreferenceThemeOverlay.v14.Material + + + + + @@ -366,4 +413,9 @@ @drawable/progress_bar_horizontal_dark + +