summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2022-12-15 23:18:14 +0100
committerByteHamster <info@bytehamster.com>2022-12-17 10:51:07 +0100
commit1d251492b08ca17852e4a8bb5b0a9638443da9b2 (patch)
treec34e5b60ceb3c94504f7d6ef26fb7dd097a4ae63
parent690eb6af8de3f9b8bb55adfdd9f524abe9a7b022 (diff)
downloadAntennaPod-1d251492b08ca17852e4a8bb5b0a9638443da9b2.zip
Add support for Material You tinted theme
-rw-r--r--app/src/main/AndroidManifest.xml4
-rw-r--r--app/src/main/java/de/danoeh/antennapod/PodcastApp.java3
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java6
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java7
-rw-r--r--app/src/main/java/de/danoeh/antennapod/dialog/ProxyDialog.java6
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java3
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java10
-rw-r--r--app/src/main/java/de/danoeh/antennapod/preferences/MasterSwitchPreference.java7
-rw-r--r--app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java7
-rw-r--r--app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java4
-rw-r--r--app/src/main/java/de/danoeh/antennapod/view/viewholder/HorizontalItemViewHolder.java7
-rw-r--r--app/src/main/res/layout/audioplayer_fragment.xml1
-rw-r--r--app/src/main/res/layout/downloadlog_item.xml114
-rw-r--r--app/src/main/res/layout/external_player_fragment.xml119
-rw-r--r--app/src/main/res/layout/feed_item_list_fragment.xml2
-rw-r--r--app/src/main/res/layout/feedinfo.xml2
-rw-r--r--app/src/main/res/layout/feeditemlist_header.xml2
-rw-r--r--app/src/main/res/layout/feeditemlist_item.xml5
-rw-r--r--app/src/main/res/layout/gpodnetauth_credentials.xml2
-rw-r--r--app/src/main/res/layout/gpodnetauth_device.xml48
-rw-r--r--app/src/main/res/layout/nav_listitem.xml3
-rw-r--r--app/src/main/res/layout/nextcloud_auth_dialog.xml2
-rw-r--r--app/src/main/res/layout/onlinefeedview_activity.xml257
-rw-r--r--app/src/main/res/xml/preferences_user_interface.xml5
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/preferences/ThemeSwitcher.java26
-rwxr-xr-xcore/src/main/res/drawable-hdpi/navigation_up.pngbin318 -> 0 bytes
-rwxr-xr-xcore/src/main/res/drawable-hdpi/navigation_up_dark.pngbin309 -> 0 bytes
-rwxr-xr-xcore/src/main/res/drawable-mdpi/navigation_up.pngbin279 -> 0 bytes
-rwxr-xr-xcore/src/main/res/drawable-mdpi/navigation_up_dark.pngbin267 -> 0 bytes
-rw-r--r--core/src/main/res/drawable-v21/drawer_item_background.xml4
-rwxr-xr-xcore/src/main/res/drawable-xhdpi/navigation_up.pngbin409 -> 0 bytes
-rwxr-xr-xcore/src/main/res/drawable-xhdpi/navigation_up_dark.pngbin408 -> 0 bytes
-rw-r--r--core/src/main/res/drawable/drawer_item_background.xml4
-rw-r--r--core/src/main/res/drawable/progress_bar_horizontal_dark.xml2
-rw-r--r--core/src/main/res/drawable/progress_bar_horizontal_light.xml2
-rw-r--r--core/src/main/res/values-v21/styles.xml2
-rw-r--r--core/src/main/res/values-v23/styles.xml2
-rw-r--r--core/src/main/res/values-v27/styles.xml2
-rw-r--r--core/src/main/res/values/attrs.xml6
-rw-r--r--core/src/main/res/values/colors.xml11
-rw-r--r--core/src/main/res/values/styles.xml164
-rw-r--r--storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java5
-rw-r--r--ui/i18n/src/main/res/values/strings.xml2
43 files changed, 453 insertions, 405 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index d888d8d99..9cce60469 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -131,10 +131,14 @@
<activity
android:name=".activity.PreferenceActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
+ android:exported="false"
android:label="@string/settings_label">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.danoeh.antennapod.activity.MainActivity"/>
+ <intent-filter>
+ <action android:name="android.intent.action.APPLICATION_PREFERENCES" />
+ </intent-filter>
</activity>
<activity
diff --git a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
index 66ce4adc6..7cbe32e11 100644
--- a/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
+++ b/app/src/main/java/de/danoeh/antennapod/PodcastApp.java
@@ -5,6 +5,7 @@ import android.content.Intent;
import android.os.StrictMode;
import androidx.multidex.MultiDexApplication;
+import com.google.android.material.color.DynamicColors;
import com.joanzapata.iconify.Iconify;
import com.joanzapata.iconify.fonts.FontAwesomeModule;
import com.joanzapata.iconify.fonts.MaterialModule;
@@ -64,6 +65,8 @@ public class PodcastApp extends MultiDexApplication {
.logNoSubscriberMessages(false)
.sendNoSubscriberEvent(false)
.installDefaultEventBus();
+
+ DynamicColors.applyToActivitiesIfAvailable(this);
}
public static void forceRestart() {
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java
index 2b11c5ff9..31e6efc5a 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/ChaptersListAdapter.java
@@ -14,12 +14,12 @@ import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.FitCenter;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
+import com.google.android.material.elevation.SurfaceColors;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.model.feed.Chapter;
import de.danoeh.antennapod.core.util.Converter;
import de.danoeh.antennapod.model.feed.EmbeddedChapterImage;
import de.danoeh.antennapod.core.util.IntentUtils;
-import de.danoeh.antennapod.ui.common.ThemeUtils;
import de.danoeh.antennapod.model.playback.Playable;
import de.danoeh.antennapod.ui.common.CircularProgressBar;
@@ -85,8 +85,8 @@ public class ChaptersListAdapter extends RecyclerView.Adapter<ChaptersListAdapte
});
if (position == currentChapterIndex) {
- int playingBackGroundColor = ThemeUtils.getColorFromAttr(context, R.attr.currently_playing_background);
- holder.itemView.setBackgroundColor(playingBackGroundColor);
+ float density = context.getResources().getDisplayMetrics().density;
+ holder.itemView.setBackgroundColor(SurfaceColors.getColorForElevation(context, 8 * density));
float progress = ((float) (currentChapterPosition - sc.getStart())) / duration;
progress = Math.max(progress, CircularProgressBar.MINIMUM_PERCENTAGE);
progress = Math.min(progress, CircularProgressBar.MAXIMUM_PERCENTAGE);
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java
index a0d86d5c0..8df3e3968 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java
@@ -8,7 +8,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Toast;
-import androidx.core.content.ContextCompat;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.MainActivity;
import de.danoeh.antennapod.net.download.serviceinterface.DownloadRequest;
@@ -93,7 +92,7 @@ public class DownloadLogAdapter extends BaseAdapter {
}
if (status.isSuccessful()) {
- holder.icon.setTextColor(ContextCompat.getColor(context, R.color.download_success_green));
+ holder.icon.setTextColor(ThemeUtils.getColorFromAttr(context, R.attr.icon_green));
holder.icon.setText("{fa-check-circle}");
holder.icon.setContentDescription(context.getString(R.string.download_successful));
holder.secondaryActionButton.setVisibility(View.INVISIBLE);
@@ -101,10 +100,10 @@ public class DownloadLogAdapter extends BaseAdapter {
holder.tapForDetails.setVisibility(View.GONE);
} else {
if (status.getReason() == DownloadError.ERROR_PARSER_EXCEPTION_DUPLICATE) {
- holder.icon.setTextColor(ContextCompat.getColor(context, R.color.download_warning_yellow));
+ holder.icon.setTextColor(ThemeUtils.getColorFromAttr(context, R.attr.icon_yellow));
holder.icon.setText("{fa-exclamation-circle}");
} else {
- holder.icon.setTextColor(ContextCompat.getColor(context, R.color.download_failed_red));
+ holder.icon.setTextColor(ThemeUtils.getColorFromAttr(context, R.attr.icon_red));
holder.icon.setText("{fa-times-circle}");
}
holder.icon.setContentDescription(context.getString(R.string.error_label));
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/ProxyDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/ProxyDialog.java
index 68dd60372..4d9c526c0 100644
--- a/app/src/main/java/de/danoeh/antennapod/dialog/ProxyDialog.java
+++ b/app/src/main/java/de/danoeh/antennapod/dialog/ProxyDialog.java
@@ -6,7 +6,6 @@ import android.content.res.TypedArray;
import android.os.Build;
import androidx.appcompat.app.AlertDialog;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
-import androidx.core.content.ContextCompat;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
@@ -31,6 +30,7 @@ import de.danoeh.antennapod.R;
import de.danoeh.antennapod.storage.preferences.UserPreferences;
import de.danoeh.antennapod.core.service.download.AntennapodHttpClient;
import de.danoeh.antennapod.model.download.ProxyConfig;
+import de.danoeh.antennapod.ui.common.ThemeUtils;
import io.reactivex.Completable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
@@ -299,7 +299,7 @@ public class ProxyDialog {
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
() -> {
- txtvMessage.setTextColor(ContextCompat.getColor(context, R.color.download_success_green));
+ txtvMessage.setTextColor(ThemeUtils.getColorFromAttr(context, R.attr.icon_green));
String message = String.format("%s %s", "{fa-check}",
context.getString(R.string.proxy_test_successful));
txtvMessage.setText(message);
@@ -307,7 +307,7 @@ public class ProxyDialog {
},
error -> {
error.printStackTrace();
- txtvMessage.setTextColor(ContextCompat.getColor(context, R.color.download_failed_red));
+ txtvMessage.setTextColor(ThemeUtils.getColorFromAttr(context, R.attr.icon_red));
String message = String.format("%s %s: %s", "{fa-close}",
context.getString(R.string.proxy_test_failed), error.getMessage());
txtvMessage.setText(message);
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java
index 1539ebecf..530d87e7f 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/AudioPlayerFragment.java
@@ -121,7 +121,8 @@ public class AudioPlayerFragment extends Fragment implements
getChildFragmentManager().beginTransaction()
.replace(R.id.playerFragment, externalPlayerFragment, ExternalPlayerFragment.TAG)
.commit();
- root.findViewById(R.id.playerFragment).setBackgroundColor(SurfaceColors.getColorForElevation(getContext(), 8));
+ root.findViewById(R.id.playerFragment).setBackgroundColor(
+ SurfaceColors.getColorForElevation(getContext(), 8 * getResources().getDisplayMetrics().density));
butPlaybackSpeed = root.findViewById(R.id.butPlaybackSpeed);
txtvPlaybackSpeed = root.findViewById(R.id.txtvPlaybackSpeed);
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java
index 59c2c4a8e..caf555964 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/UserInterfacePreferencesFragment.java
@@ -44,6 +44,16 @@ public class UserInterfacePreferencesFragment extends PreferenceFragmentCompat {
return true;
});
+ if (Build.VERSION.SDK_INT < 31) {
+ findPreference(UserPreferences.PREF_TINTED_COLORS).setVisible(false);
+ }
+ findPreference(UserPreferences.PREF_TINTED_COLORS)
+ .setOnPreferenceChangeListener(
+ (preference, newValue) -> {
+ ActivityCompat.recreate(getActivity());
+ return true;
+ });
+
findPreference(UserPreferences.PREF_SHOW_TIME_LEFT)
.setOnPreferenceChangeListener(
(preference, newValue) -> {
diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/MasterSwitchPreference.java b/app/src/main/java/de/danoeh/antennapod/preferences/MasterSwitchPreference.java
index 94e60ef61..62e162a7c 100644
--- a/app/src/main/java/de/danoeh/antennapod/preferences/MasterSwitchPreference.java
+++ b/app/src/main/java/de/danoeh/antennapod/preferences/MasterSwitchPreference.java
@@ -7,10 +7,10 @@ import android.os.Build;
import androidx.preference.SwitchPreferenceCompat;
import androidx.preference.PreferenceViewHolder;
import android.util.AttributeSet;
-import android.util.TypedValue;
import android.widget.TextView;
import de.danoeh.antennapod.R;
+import de.danoeh.antennapod.ui.common.ThemeUtils;
public class MasterSwitchPreference extends SwitchPreferenceCompat {
@@ -36,10 +36,7 @@ public class MasterSwitchPreference extends SwitchPreferenceCompat {
public void onBindViewHolder(PreferenceViewHolder holder) {
super.onBindViewHolder(holder);
- TypedValue typedValue = new TypedValue();
- getContext().getTheme().resolveAttribute(R.attr.master_switch_background, typedValue, true);
- holder.itemView.setBackgroundColor(typedValue.data);
-
+ holder.itemView.setBackgroundColor(ThemeUtils.getColorFromAttr(getContext(), R.attr.colorSurfaceVariant));
TextView title = (TextView) holder.findViewById(android.R.id.title);
if (title != null) {
title.setTypeface(title.getTypeface(), Typeface.BOLD);
diff --git a/app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java b/app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java
index 7c6b64e2c..d35206647 100644
--- a/app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java
+++ b/app/src/main/java/de/danoeh/antennapod/view/ChapterSeekBar.java
@@ -6,6 +6,7 @@ import android.graphics.Paint;
import android.os.Handler;
import android.os.Looper;
import android.util.AttributeSet;
+import de.danoeh.antennapod.R;
import de.danoeh.antennapod.ui.common.ThemeUtils;
public class ChapterSeekBar extends androidx.appcompat.widget.AppCompatSeekBar {
@@ -42,11 +43,9 @@ public class ChapterSeekBar extends androidx.appcompat.widget.AppCompatSeekBar {
dividerPos = null;
density = context.getResources().getDisplayMetrics().density;
- paintBackground.setColor(ThemeUtils.getColorFromAttr(getContext(),
- de.danoeh.antennapod.core.R.attr.currently_playing_background));
+ paintBackground.setColor(ThemeUtils.getColorFromAttr(getContext(), R.attr.colorSurfaceVariant));
paintBackground.setAlpha(128);
- paintProgressPrimary.setColor(ThemeUtils.getColorFromAttr(getContext(),
- de.danoeh.antennapod.core.R.attr.colorPrimary));
+ paintProgressPrimary.setColor(ThemeUtils.getColorFromAttr(getContext(), R.attr.colorPrimary));
}
/**
diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java
index 72ad46373..9da836a69 100644
--- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java
+++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java
@@ -15,6 +15,7 @@ import android.widget.TextView;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView;
+import com.google.android.material.elevation.SurfaceColors;
import com.joanzapata.iconify.Iconify;
import de.danoeh.antennapod.R;
@@ -141,7 +142,8 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder {
duration.setVisibility(media.getDuration() > 0 ? View.VISIBLE : View.GONE);
if (PlaybackStatus.isCurrentlyPlaying(media)) {
- itemView.setBackgroundColor(ThemeUtils.getColorFromAttr(activity, R.attr.currently_playing_background));
+ float density = activity.getResources().getDisplayMetrics().density;
+ itemView.setBackgroundColor(SurfaceColors.getColorForElevation(activity, 8 * density));
} else {
itemView.setBackgroundResource(ThemeUtils.getDrawableFromAttr(activity, R.attr.selectableItemBackground));
}
diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/HorizontalItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/HorizontalItemViewHolder.java
index 83d589518..05240b371 100644
--- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/HorizontalItemViewHolder.java
+++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/HorizontalItemViewHolder.java
@@ -8,6 +8,7 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView;
+import com.google.android.material.elevation.SurfaceColors;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.MainActivity;
import de.danoeh.antennapod.adapter.CoverLoader;
@@ -56,6 +57,8 @@ public class HorizontalItemViewHolder extends RecyclerView.ViewHolder {
this.item = item;
card.setAlpha(1.0f);
+ float density = activity.getResources().getDisplayMetrics().density;
+ card.setCardBackgroundColor(SurfaceColors.getColorForElevation(activity, 1 * density));
new CoverLoader(activity)
.withUri(ImageResourceUtils.getEpisodeListImageLocation(item))
.withFallbackUri(item.getFeed().getImageUrl())
@@ -73,9 +76,7 @@ public class HorizontalItemViewHolder extends RecyclerView.ViewHolder {
setProgressBar(false, 0);
} else {
if (PlaybackStatus.isCurrentlyPlaying(media)) {
- card.setCardBackgroundColor(ThemeUtils.getColorFromAttr(activity, R.attr.card_background_playing));
- } else {
- card.setCardBackgroundColor(ThemeUtils.getColorFromAttr(activity, R.attr.card_background));
+ card.setCardBackgroundColor(ThemeUtils.getColorFromAttr(activity, R.attr.colorSurfaceVariant));
}
if (item.getMedia().getDuration() > 0 && item.getMedia().getPosition() > 0) {
diff --git a/app/src/main/res/layout/audioplayer_fragment.xml b/app/src/main/res/layout/audioplayer_fragment.xml
index 9b1650a76..a9964089c 100644
--- a/app/src/main/res/layout/audioplayer_fragment.xml
+++ b/app/src/main/res/layout/audioplayer_fragment.xml
@@ -11,7 +11,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
- android:background="?attr/background_elevated"
android:elevation="8dp"
tools:layout_height="@dimen/external_player_height" />
diff --git a/app/src/main/res/layout/downloadlog_item.xml b/app/src/main/res/layout/downloadlog_item.xml
index f55e0f25e..9ca19b531 100644
--- a/app/src/main/res/layout/downloadlog_item.xml
+++ b/app/src/main/res/layout/downloadlog_item.xml
@@ -1,78 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:gravity="center_vertical"
- android:baselineAligned="false"
- android:descendantFocusability="blocksDescendants">
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:baselineAligned="false"
+ android:descendantFocusability="blocksDescendants">
<LinearLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding"
- android:layout_marginRight="@dimen/listitem_threeline_textrightpadding"
- android:layout_marginEnd="@dimen/listitem_threeline_textrightpadding"
- android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
- android:layout_marginLeft="16dp"
- android:layout_marginStart="16dp"
- android:layout_weight="1"
- android:orientation="vertical">
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding"
+ android:layout_marginRight="@dimen/listitem_threeline_textrightpadding"
+ android:layout_marginEnd="@dimen/listitem_threeline_textrightpadding"
+ android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:layout_weight="1"
+ android:orientation="vertical">
<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:gravity="center_vertical">
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:gravity="center_vertical">
<com.joanzapata.iconify.widget.IconTextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginEnd="4dp"
- android:padding="2dp"
- android:id="@+id/txtvIcon"
- android:textSize="18sp"
- android:gravity="center"/>
+ android:id="@+id/txtvIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="4dp"
+ android:padding="2dp"
+ android:textSize="18sp"
+ android:gravity="center" />
<TextView
- android:id="@+id/txtvTitle"
- style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- tools:text="@sample/episodes.json/data/title"
- android:maxLines="1"
- android:ellipsize="end"
- tools:background="@android:color/holo_blue_light"/>
+ android:id="@+id/txtvTitle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:maxLines="1"
+ android:ellipsize="end"
+ style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
+ tools:text="@sample/episodes.json/data/title"
+ tools:background="@android:color/holo_blue_light" />
</LinearLayout>
<TextView
- android:id="@+id/status"
- style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- tools:text="Media file - 01/01/1970"/>
+ android:id="@+id/status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
+ tools:text="Media file - 01/01/1970" />
<TextView
- android:id="@+id/txtvReason"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="14sp"
- android:textColor="@color/download_failed_red"
- tools:text="@string/design_time_downloaded_log_failure_reason"/>
+ android:id="@+id/txtvReason"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="14sp"
+ android:textColor="?attr/icon_red"
+ tools:text="@string/design_time_downloaded_log_failure_reason" />
<TextView
- android:id="@+id/txtvTapForDetails"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textSize="14sp"
- android:textColor="?android:attr/textColorSecondary"
- android:text="@string/download_error_tap_for_details"/>
+ android:id="@+id/txtvTapForDetails"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="14sp"
+ android:textColor="?android:attr/textColorSecondary"
+ android:text="@string/download_error_tap_for_details" />
</LinearLayout>
- <include layout="@layout/secondary_action"/>
+ <include
+ layout="@layout/secondary_action" />
+
</LinearLayout>
diff --git a/app/src/main/res/layout/external_player_fragment.xml b/app/src/main/res/layout/external_player_fragment.xml
index fa881e622..4969215d9 100644
--- a/app/src/main/res/layout/external_player_fragment.xml
+++ b/app/src/main/res/layout/external_player_fragment.xml
@@ -1,81 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/fragmentLayout"
- android:layout_width="match_parent"
- android:layout_height="@dimen/external_player_height"
- android:background="?attr/selectableItemBackground"
- android:orientation="vertical">
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/fragmentLayout"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/external_player_height"
+ android:background="?attr/selectableItemBackground"
+ android:orientation="vertical">
<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:gravity="center_vertical"
- android:layout_weight="1">
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:gravity="center_vertical"
+ android:layout_weight="1">
<ImageView
- android:id="@+id/imgvCover"
- android:contentDescription="@string/media_player"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:adjustViewBounds="true"
- android:cropToPadding="true"
- android:maxWidth="96dp"
- android:scaleType="fitCenter"
- android:background="@color/non_square_icon_background"
- tools:src="@tools:sample/avatars"/>
-
+ android:id="@+id/imgvCover"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:contentDescription="@string/media_player"
+ android:adjustViewBounds="true"
+ android:cropToPadding="true"
+ android:maxWidth="96dp"
+ android:scaleType="fitCenter"
+ android:background="@color/non_square_icon_background"
+ tools:src="@tools:sample/avatars" />
<LinearLayout
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="vertical"
- android:layout_marginLeft="16dp"
- android:layout_marginStart="16dp">
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp">
<TextView
- android:id="@+id/txtvTitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@style/Base.TextAppearance.AppCompat.Body1"
- android:ellipsize="end"
- android:maxLines="1"
- tools:text="Episode title that is too long and will cause the text to wrap"/>
+ android:id="@+id/txtvTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:maxLines="1"
+ style="@style/Base.TextAppearance.AppCompat.Body1"
+ tools:text="Episode title that is too long and will cause the text to wrap" />
<TextView
- android:id="@+id/txtvAuthor"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@style/TextAppearance.AppCompat.Body1"
- android:textColor="?android:attr/textColorSecondary"
- android:ellipsize="end"
- android:maxLines="1"
- tools:text="Episode author that is too long and will cause the text to wrap"/>
- </LinearLayout>
+ android:id="@+id/txtvAuthor"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?android:attr/textColorSecondary"
+ android:ellipsize="end"
+ android:maxLines="1"
+ style="@style/TextAppearance.AppCompat.Body1"
+ tools:text="Episode author that is too long and will cause the text to wrap" />
+ </LinearLayout>
<de.danoeh.antennapod.view.PlayButton
- android:id="@+id/butPlay"
- android:layout_width="52dp"
- android:layout_height="match_parent"
- android:contentDescription="@string/pause_label"
- android:background="?attr/selectableItemBackground"
- app:srcCompat="@drawable/ic_play_48dp"
- android:scaleType="fitCenter"
- android:padding="8dp"
- tools:src="@drawable/ic_play_48dp"/>
+ android:id="@+id/butPlay"
+ android:layout_width="52dp"
+ android:layout_height="match_parent"
+ android:contentDescription="@string/pause_label"
+ android:background="?attr/selectableItemBackground"
+ android:scaleType="fitCenter"
+ android:padding="8dp"
+ app:srcCompat="@drawable/ic_play_48dp"
+ tools:src="@drawable/ic_play_48dp" />
</LinearLayout>
<ProgressBar
- android:id="@+id/episodeProgress"
- android:layout_width="match_parent"
- android:layout_height="4dp"
- style="?attr/progressBarTheme"
- android:indeterminate="false"
- tools:progress="100"/>
+ android:id="@+id/episodeProgress"
+ android:layout_width="match_parent"
+ android:layout_height="4dp"
+ android:indeterminate="false"
+ style="?android:attr/progressBarStyleHorizontal"
+ tools:progress="100" />
</LinearLayout>
diff --git a/app/src/main/res/layout/feed_item_list_fragment.xml b/app/src/main/res/layout/feed_item_list_fragment.xml
index 043929e32..b96789ba2 100644
--- a/app/src/main/res/layout/feed_item_list_fragment.xml
+++ b/app/src/main/res/layout/feed_item_list_fragment.xml
@@ -23,7 +23,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/image_readability_tint"
- style="@style/BigBlurryBackground"
+ android:scaleType="centerCrop"
app:layout_collapseMode="parallax"
app:layout_collapseParallaxMultiplier="0.6" />
diff --git a/app/src/main/res/layout/feedinfo.xml b/app/src/main/res/layout/feedinfo.xml
index af4aa2570..9771bd7fc 100644
--- a/app/src/main/res/layout/feedinfo.xml
+++ b/app/src/main/res/layout/feedinfo.xml
@@ -26,7 +26,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/image_readability_tint"
- style="@style/BigBlurryBackground"
+ android:scaleType="centerCrop"
app:layout_collapseMode="parallax"
app:layout_collapseParallaxMultiplier="0.6" />
diff --git a/app/src/main/res/layout/feeditemlist_header.xml b/app/src/main/res/layout/feeditemlist_header.xml
index 6bd31ed9d..ba8b4fcd8 100644
--- a/app/src/main/res/layout/feeditemlist_header.xml
+++ b/app/src/main/res/layout/feeditemlist_header.xml
@@ -145,7 +145,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="2dp"
- android:background="@color/download_failed_red"
+ android:background="?attr/icon_red"
android:gravity="center"
android:textColor="@color/white"
android:visibility="gone"
diff --git a/app/src/main/res/layout/feeditemlist_item.xml b/app/src/main/res/layout/feeditemlist_item.xml
index f730c1c2b..e6c1d1dfa 100644
--- a/app/src/main/res/layout/feeditemlist_item.xml
+++ b/app/src/main/res/layout/feeditemlist_item.xml
@@ -116,8 +116,7 @@
android:layout_width="14sp"
android:layout_height="14sp"
android:contentDescription="@string/is_inbox_label"
- app:srcCompat="@drawable/ic_inbox"
- app:tint="?attr/colorAccent" />
+ app:srcCompat="@drawable/ic_inbox" />
<ImageView
android:id="@+id/ivIsVideo"
@@ -221,7 +220,7 @@
android:layout_weight="1"
android:max="100"
android:layout_margin="4dp"
- style="?attr/progressBarTheme"
+ style="?android:attr/progressBarStyleHorizontal"
tools:background="@android:color/holo_blue_light" />
<TextView
diff --git a/app/src/main/res/layout/gpodnetauth_credentials.xml b/app/src/main/res/layout/gpodnetauth_credentials.xml
index 91224744b..e318f11d9 100644
--- a/app/src/main/res/layout/gpodnetauth_credentials.xml
+++ b/app/src/main/res/layout/gpodnetauth_credentials.xml
@@ -58,7 +58,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:textColor="@color/download_failed_red"
+ android:textColor="?attr/icon_red"
android:textSize="@dimen/text_size_small"
android:maxLines="2"
android:ellipsize="end"
diff --git a/app/src/main/res/layout/gpodnetauth_device.xml b/app/src/main/res/layout/gpodnetauth_device.xml
index 656ba0889..cb133f684 100644
--- a/app/src/main/res/layout/gpodnetauth_device.xml
+++ b/app/src/main/res/layout/gpodnetauth_device.xml
@@ -1,45 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
- style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
- android:id="@+id/deviceName"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/gpodnetauth_device_name"
- android:lines="1"
- android:imeOptions="actionNext|flagNoFullscreen"/>
+ android:id="@+id/deviceName"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/gpodnetauth_device_name"
+ android:lines="1"
+ android:imeOptions="actionNext|flagNoFullscreen" />
</com.google.android.material.textfield.TextInputLayout>
<Button
- android:id="@+id/createDeviceButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right|end"
- android:text="@string/gpodnetauth_create_device"/>
+ android:id="@+id/createDeviceButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right|end"
+ android:text="@string/gpodnetauth_create_device" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- style="@style/AntennaPod.TextView.Heading"
android:layout_marginTop="16dp"
- android:text="@string/gpodnetauth_existing_devices"/>
+ android:text="@string/gpodnetauth_existing_devices"
+ style="@style/AntennaPod.TextView.Heading" />
<TextView
android:id="@+id/deviceSelectError"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textColor="@color/download_failed_red"
+ android:textColor="?attr/icon_red"
android:textSize="@dimen/text_size_small"
android:visibility="gone"
tools:text="Error message"
@@ -55,7 +55,7 @@
android:id="@+id/progbarCreateDevice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/download_failed_red"
+ android:textColor="?attr/icon_red"
android:visibility="gone" />
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/app/src/main/res/layout/nav_listitem.xml b/app/src/main/res/layout/nav_listitem.xml
index 0aca5eb7d..e0a7f9ed0 100644
--- a/app/src/main/res/layout/nav_listitem.xml
+++ b/app/src/main/res/layout/nav_listitem.xml
@@ -58,8 +58,7 @@
android:layout_toLeftOf="@id/txtvCount"
android:visibility="gone"
app:srcCompat="@drawable/ic_error"
- app:tint="@color/download_failed_red"
- tools:background="@android:color/holo_green_dark"
+ app:tint="?attr/icon_red"
tools:text="!" />
<TextView
diff --git a/app/src/main/res/layout/nextcloud_auth_dialog.xml b/app/src/main/res/layout/nextcloud_auth_dialog.xml
index 345eec88b..08cf05ef9 100644
--- a/app/src/main/res/layout/nextcloud_auth_dialog.xml
+++ b/app/src/main/res/layout/nextcloud_auth_dialog.xml
@@ -51,7 +51,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
- android:textColor="@color/download_failed_red"
+ android:textColor="?attr/icon_red"
android:layout_marginBottom="16dp" />
<Button
diff --git a/app/src/main/res/layout/onlinefeedview_activity.xml b/app/src/main/res/layout/onlinefeedview_activity.xml
index f1297baf4..9e89e8a0f 100644
--- a/app/src/main/res/layout/onlinefeedview_activity.xml
+++ b/app/src/main/res/layout/onlinefeedview_activity.xml
@@ -1,168 +1,171 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/transparentBackground"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/card"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:id="@+id/transparentBackground">
+ android:layout_margin="32dp"
+ android:elevation="16dp"
+ app:cardCornerRadius="4dp">
- <androidx.cardview.widget.CardView
+ <FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
- app:cardCornerRadius="4dp"
- android:layout_margin="32dp"
- android:elevation="16dp"
- android:id="@+id/card">
-
- <FrameLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:orientation="vertical">
<ProgressBar
- style="?android:attr/progressBarStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/progressBar"
- android:layout_gravity="center"/>
+ android:id="@+id/progressBar"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ style="?android:attr/progressBarStyle" />
<LinearLayout
- android:id="@+id/feed_display_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:id="@+id/feed_display_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
<RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/feed_image_bg">
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/feed_image_bg">
<ImageView
- android:id="@+id/backgroundImage"
- style="@style/BigBlurryBackground"
- android:layout_width="match_parent"
- android:layout_height="@dimen/feeditemlist_header_height"/>
+ android:id="@+id/backgroundImage"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/feeditemlist_header_height"
+ android:scaleType="centerCrop" />
<ImageView
- android:id="@+id/coverImage"
- android:layout_width="@dimen/thumbnail_length_onlinefeedview"
- android:layout_height="@dimen/thumbnail_length_onlinefeedview"
- android:layout_alignParentLeft="true"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true"
- android:layout_centerVertical="true"
- android:layout_marginBottom="16dp"
- android:layout_marginLeft="16dp"
- android:layout_marginStart="16dp"
- android:layout_marginTop="16dp"
- android:importantForAccessibility="no"
- tools:src="@tools:sample/avatars"/>
+ android:id="@+id/coverImage"
+ android:layout_width="@dimen/thumbnail_length_onlinefeedview"
+ android:layout_height="@dimen/thumbnail_length_onlinefeedview"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true"
+ android:layout_centerVertical="true"
+ android:layout_marginBottom="16dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="16dp"
+ android:importantForAccessibility="no"
+ tools:src="@tools:sample/avatars" />
<TextView
- android:id="@+id/titleLabel"
- style="@style/AntennaPod.TextView.Heading"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_marginBottom="16dp"
- android:layout_marginLeft="16dp"
- android:layout_marginStart="16dp"
- android:layout_marginTop="16dp"
- android:layout_marginRight="16dp"
- android:layout_marginEnd="16dp"
- android:layout_alignParentEnd="true"
- android:layout_alignParentRight="true"
- android:layout_toRightOf="@id/coverImage"
- android:layout_toEndOf="@id/coverImage"
- android:ellipsize="end"
- android:maxLines="2"
- android:shadowColor="@color/black"
- android:shadowRadius="3"
- android:textColor="@color/white"
- tools:text="Podcast title"/>
+ android:id="@+id/titleLabel"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_marginBottom="16dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:layout_toRightOf="@id/coverImage"
+ android:layout_toEndOf="@id/coverImage"
+ android:ellipsize="end"
+ android:maxLines="2"
+ android:shadowColor="@color/black"
+ android:shadowRadius="3"
+ android:textColor="@color/white"
+ style="@style/AntennaPod.TextView.Heading"
+ tools:text="Podcast title" />
<TextView
- android:id="@+id/author_label"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_below="@id/titleLabel"
- android:layout_marginBottom="16dp"
- android:layout_marginLeft="16dp"
- android:layout_marginStart="16dp"
- android:layout_marginRight="16dp"
- android:layout_marginEnd="16dp"
- android:layout_alignParentEnd="true"
- android:layout_alignParentRight="true"
- android:layout_toRightOf="@id/coverImage"
- android:layout_toEndOf="@id/coverImage"
- android:ellipsize="end"
- android:lines="1"
- android:shadowColor="@color/black"
- android:shadowRadius="3"
- android:textColor="@color/white"
- android:textSize="@dimen/text_size_small"
- tools:text="Podcast author"/>
+ android:id="@+id/author_label"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/titleLabel"
+ android:layout_marginBottom="16dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:layout_toRightOf="@id/coverImage"
+ android:layout_toEndOf="@id/coverImage"
+ android:ellipsize="end"
+ android:lines="1"
+ android:shadowColor="@color/black"
+ android:shadowRadius="3"
+ android:textColor="@color/white"
+ android:textSize="@dimen/text_size_small"
+ tools:text="Podcast author" />
+
</RelativeLayout>
<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginEnd="8dp"
- android:layout_marginBottom="16dp"
- android:orientation="vertical">
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="8dp"
+ android:layout_marginBottom="16dp"
+ android:orientation="vertical">
<Spinner
- android:id="@+id/alternate_urls_spinner"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:dropDownWidth="match_parent"
- android:padding="8dp"
- android:textColor="?android:attr/textColorPrimary"
- android:textSize="@dimen/text_size_micro" />
+ android:id="@+id/alternate_urls_spinner"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:dropDownWidth="match_parent"
+ android:padding="8dp"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="@dimen/text_size_micro" />
<Button
- android:id="@+id/subscribeButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginTop="16dp"
- android:layout_marginEnd="8dp"
- android:focusable="false"
- android:text="@string/subscribe_label" />
+ android:id="@+id/subscribeButton"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="16dp"
+ android:layout_marginEnd="8dp"
+ android:focusable="false"
+ android:text="@string/subscribe_label" />
<CheckBox
- android:id="@+id/autoDownloadCheckBox"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:focusable="false"
- android:checked="true"
- android:text="@string/auto_download_label"
- android:visibility="gone"
- tools:visibility="visible" />
+ android:id="@+id/autoDownloadCheckBox"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:focusable="false"
+ android:checked="true"
+ android:text="@string/auto_download_label"
+ android:visibility="gone"
+ tools:visibility="visible" />
<Button
- android:id="@+id/stopPreviewButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="8dp"
- android:focusable="false"
- android:text="@string/stop_preview"
- android:visibility="gone"
- tools:visibility="visible" />
+ android:id="@+id/stopPreviewButton"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="8dp"
+ android:focusable="false"
+ android:text="@string/stop_preview"
+ android:visibility="gone"
+ tools:visibility="visible" />
</LinearLayout>
<ListView
- android:id="@+id/listView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
+ android:id="@+id/listView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
</LinearLayout>
</FrameLayout>
+
</androidx.cardview.widget.CardView>
-</LinearLayout> \ No newline at end of file
+
+</LinearLayout>
diff --git a/app/src/main/res/xml/preferences_user_interface.xml b/app/src/main/res/xml/preferences_user_interface.xml
index dd3810efc..0546f4732 100644
--- a/app/src/main/res/xml/preferences_user_interface.xml
+++ b/app/src/main/res/xml/preferences_user_interface.xml
@@ -11,6 +11,11 @@
android:key="prefTheme"
android:summary="@string/pref_set_theme_sum"
android:defaultValue="system"/>
+ <SwitchPreferenceCompat
+ android:title="@string/pref_tinted_theme_title"
+ android:key="prefTintedColors"
+ android:summary="@string/pref_tinted_theme_message"
+ android:defaultValue="false" />
<Preference
android:key="prefHiddenDrawerItems"
android:summary="@string/pref_nav_drawer_items_sum"
diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/ThemeSwitcher.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/ThemeSwitcher.java
index 631d0a84f..b7e4934f5 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/preferences/ThemeSwitcher.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/ThemeSwitcher.java
@@ -9,40 +9,48 @@ import de.danoeh.antennapod.storage.preferences.UserPreferences;
public abstract class ThemeSwitcher {
@StyleRes
public static int getTheme(Context context) {
+ boolean dynamic = UserPreferences.getIsThemeColorTinted();
switch (readThemeValue(context)) {
case DARK:
- return R.style.Theme_AntennaPod_Dark;
+ return dynamic ? R.style.Theme_AntennaPod_Dynamic_Dark : R.style.Theme_AntennaPod_Dark;
case BLACK:
- return R.style.Theme_AntennaPod_TrueBlack;
+ return dynamic ? R.style.Theme_AntennaPod_Dynamic_TrueBlack : R.style.Theme_AntennaPod_TrueBlack;
case LIGHT: // fall-through
default:
- return R.style.Theme_AntennaPod_Light;
+ return dynamic ? R.style.Theme_AntennaPod_Dynamic_Light : R.style.Theme_AntennaPod_Light;
}
}
@StyleRes
public static int getNoTitleTheme(Context context) {
+ boolean dynamic = UserPreferences.getIsThemeColorTinted();
switch (readThemeValue(context)) {
case DARK:
- return R.style.Theme_AntennaPod_Dark_NoTitle;
+ return dynamic ? R.style.Theme_AntennaPod_Dynamic_Dark_NoTitle : R.style.Theme_AntennaPod_Dark_NoTitle;
case BLACK:
- return R.style.Theme_AntennaPod_TrueBlack_NoTitle;
+ return dynamic ? R.style.Theme_AntennaPod_Dynamic_TrueBlack_NoTitle
+ : R.style.Theme_AntennaPod_TrueBlack_NoTitle;
case LIGHT: // fall-through
default:
- return R.style.Theme_AntennaPod_Light_NoTitle;
+ return dynamic ? R.style.Theme_AntennaPod_Dynamic_Light_NoTitle
+ : R.style.Theme_AntennaPod_Light_NoTitle;
}
}
@StyleRes
public static int getTranslucentTheme(Context context) {
+ boolean dynamic = UserPreferences.getIsThemeColorTinted();
switch (readThemeValue(context)) {
case DARK:
- return R.style.Theme_AntennaPod_Dark_Translucent;
+ return dynamic ? R.style.Theme_AntennaPod_Dynamic_Dark_Translucent
+ : R.style.Theme_AntennaPod_Dark_Translucent;
case BLACK:
- return R.style.Theme_AntennaPod_TrueBlack_Translucent;
+ return dynamic ? R.style.Theme_AntennaPod_Dynamic_TrueBlack_Translucent
+ : R.style.Theme_AntennaPod_TrueBlack_Translucent;
case LIGHT: // fall-through
default:
- return R.style.Theme_AntennaPod_Light_Translucent;
+ return dynamic ? R.style.Theme_AntennaPod_Dynamic_Light_Translucent
+ : R.style.Theme_AntennaPod_Light_Translucent;
}
}
diff --git a/core/src/main/res/drawable-hdpi/navigation_up.png b/core/src/main/res/drawable-hdpi/navigation_up.png
deleted file mode 100755
index 370092e7e..000000000
--- a/core/src/main/res/drawable-hdpi/navigation_up.png
+++ /dev/null
Binary files differ
diff --git a/core/src/main/res/drawable-hdpi/navigation_up_dark.png b/core/src/main/res/drawable-hdpi/navigation_up_dark.png
deleted file mode 100755
index 2b520c553..000000000
--- a/core/src/main/res/drawable-hdpi/navigation_up_dark.png
+++ /dev/null
Binary files differ
diff --git a/core/src/main/res/drawable-mdpi/navigation_up.png b/core/src/main/res/drawable-mdpi/navigation_up.png
deleted file mode 100755
index 520e11da6..000000000
--- a/core/src/main/res/drawable-mdpi/navigation_up.png
+++ /dev/null
Binary files differ
diff --git a/core/src/main/res/drawable-mdpi/navigation_up_dark.png b/core/src/main/res/drawable-mdpi/navigation_up_dark.png
deleted file mode 100755
index e53627915..000000000
--- a/core/src/main/res/drawable-mdpi/navigation_up_dark.png
+++ /dev/null
Binary files differ
diff --git a/core/src/main/res/drawable-v21/drawer_item_background.xml b/core/src/main/res/drawable-v21/drawer_item_background.xml
index 1992158cc..40727bf50 100644
--- a/core/src/main/res/drawable-v21/drawer_item_background.xml
+++ b/core/src/main/res/drawable-v21/drawer_item_background.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?attr/currently_playing_background">
+<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?attr/colorSurfaceVariant">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/black"/>
@@ -10,7 +10,7 @@
<selector>
<item android:state_selected="true">
<shape android:shape="rectangle">
- <solid android:color="?attr/drawer_activated_color"/>
+ <solid android:color="?attr/colorSurfaceVariant"/>
<corners android:radius="32dp"/>
</shape>
</item>
diff --git a/core/src/main/res/drawable-xhdpi/navigation_up.png b/core/src/main/res/drawable-xhdpi/navigation_up.png
deleted file mode 100755
index 0f954094e..000000000
--- a/core/src/main/res/drawable-xhdpi/navigation_up.png
+++ /dev/null
Binary files differ
diff --git a/core/src/main/res/drawable-xhdpi/navigation_up_dark.png b/core/src/main/res/drawable-xhdpi/navigation_up_dark.png
deleted file mode 100755
index 539222b2f..000000000
--- a/core/src/main/res/drawable-xhdpi/navigation_up_dark.png
+++ /dev/null
Binary files differ
diff --git a/core/src/main/res/drawable/drawer_item_background.xml b/core/src/main/res/drawable/drawer_item_background.xml
index a0ec893a8..1eb0d4e11 100644
--- a/core/src/main/res/drawable/drawer_item_background.xml
+++ b/core/src/main/res/drawable/drawer_item_background.xml
@@ -2,13 +2,13 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
- <solid android:color="?attr/currently_playing_background"/>
+ <solid android:color="?attr/colorSurfaceVariant"/>
<corners android:radius="32dp"/>
</shape>
</item>
<item android:state_selected="true">
<shape android:shape="rectangle">
- <solid android:color="?attr/drawer_activated_color" />
+ <solid android:color="?attr/colorSurfaceVariant" />
<corners android:radius="32dp" />
</shape>
</item>
diff --git a/core/src/main/res/drawable/progress_bar_horizontal_dark.xml b/core/src/main/res/drawable/progress_bar_horizontal_dark.xml
index 7a09fa73f..b575c2f80 100644
--- a/core/src/main/res/drawable/progress_bar_horizontal_dark.xml
+++ b/core/src/main/res/drawable/progress_bar_horizontal_dark.xml
@@ -8,7 +8,7 @@
<item android:id="@android:id/progress">
<clip>
<shape>
- <solid android:color="@color/accent_dark"/>
+ <solid android:color="?attr/colorAccent"/>
</shape>
</clip>
</item>
diff --git a/core/src/main/res/drawable/progress_bar_horizontal_light.xml b/core/src/main/res/drawable/progress_bar_horizontal_light.xml
index b982f522f..b2e18c988 100644
--- a/core/src/main/res/drawable/progress_bar_horizontal_light.xml
+++ b/core/src/main/res/drawable/progress_bar_horizontal_light.xml
@@ -8,7 +8,7 @@
<item android:id="@android:id/progress">
<clip>
<shape>
- <solid android:color="@color/accent_light"/>
+ <solid android:color="?attr/colorAccent"/>
</shape>
</clip>
</item>
diff --git a/core/src/main/res/values-v21/styles.xml b/core/src/main/res/values-v21/styles.xml
index fd2e0b640..eb3a3d03e 100644
--- a/core/src/main/res/values-v21/styles.xml
+++ b/core/src/main/res/values-v21/styles.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="Theme.AntennaPod.Light" parent="Theme.Base.AntennaPod.Light">
+ <style name="Theme.AntennaPod.Dynamic.Light" parent="Theme.Base.AntennaPod.Dynamic.Light">
<!-- To make icons visible -->
<item name="android:statusBarColor">@color/grey600</item>
<item name="android:navigationBarColor">@color/grey600</item>
diff --git a/core/src/main/res/values-v23/styles.xml b/core/src/main/res/values-v23/styles.xml
index ef24601e2..95740f648 100644
--- a/core/src/main/res/values-v23/styles.xml
+++ b/core/src/main/res/values-v23/styles.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="Theme.AntennaPod.Light" parent="Theme.Base.AntennaPod.Light">
+ <style name="Theme.AntennaPod.Dynamic.Light" parent="Theme.Base.AntennaPod.Dynamic.Light">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowLightStatusBar">true</item>
<!-- To make icons visible -->
diff --git a/core/src/main/res/values-v27/styles.xml b/core/src/main/res/values-v27/styles.xml
index 3ee5f0d64..df4d786be 100644
--- a/core/src/main/res/values-v27/styles.xml
+++ b/core/src/main/res/values-v27/styles.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="Theme.AntennaPod.Light" parent="Theme.Base.AntennaPod.Light">
+ <style name="Theme.AntennaPod.Dynamic.Light" parent="Theme.Base.AntennaPod.Dynamic.Light">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:navigationBarColor">@color/background_light</item>
diff --git a/core/src/main/res/values/attrs.xml b/core/src/main/res/values/attrs.xml
index 67f11694d..57fde8e10 100644
--- a/core/src/main/res/values/attrs.xml
+++ b/core/src/main/res/values/attrs.xml
@@ -1,11 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <attr name="navigation_up" format="reference"/>
<attr name="dragview_background" format="reference"/>
<attr name="progressBarTheme" format="reference"/>
- <attr name="master_switch_background" format="color"/>
- <attr name="currently_playing_background" format="color"/>
- <attr name="drawer_activated_color" format="color"/>
<attr name="action_icon_color" format="color"/>
<attr name="scrollbar_thumb" format="reference"/>
<attr name="background_color" format="color"/>
@@ -16,6 +12,4 @@
<attr name="icon_green" format="color" />
<attr name="icon_purple" format="color" />
<attr name="icon_gray" format="color" />
- <attr name="card_background" format="color" />
- <attr name="card_background_playing" format="color" />
</resources>
diff --git a/core/src/main/res/values/colors.xml b/core/src/main/res/values/colors.xml
index 8b84e11a2..1e467802e 100644
--- a/core/src/main/res/values/colors.xml
+++ b/core/src/main/res/values/colors.xml
@@ -7,9 +7,6 @@
<color name="light_gray">#bfbfbf</color>
<color name="medium_gray">#afafaf</color>
<color name="black">#000000</color>
- <color name="download_success_green">#248800</color>
- <color name="download_warning_yellow">#F59F00</color>
- <color name="download_failed_red">#B00020</color>
<color name="image_readability_tint">#80000000</color>
<color name="feed_image_bg">#50000000</color>
<color name="feed_text_bg">#ccbfbfbf</color>
@@ -19,21 +16,13 @@
<color name="background_elevated_light">#EFEEEE</color>
<color name="background_darktheme">#21272b</color>
<color name="background_elevated_darktheme">#2D3337</color>
- <color name="highlight_light">#46C6C6C6</color>
- <color name="highlight_dark">#43707070</color>
- <color name="highlight_trueblack">#43707070</color>
<color name="non_square_icon_background">#22777777</color>
<color name="seek_background_light">#90000000</color>
<color name="seek_background_dark">#905B5B5B</color>
<color name="navigation_bar_divider_light">#1F000000</color>
<color name="accent_light">#0078C2</color>
- <color name="accent_light_alpha">#250078C2</color>
<color name="accent_dark">#3D8BFF</color>
- <color name="accent_dark_alpha">#253D8BFF</color>
<color name="icon_background_gradient_start">#0ba2ff</color>
<color name="icon_background_gradient_end">#0878ff</color>
-
- <color name="master_switch_background_light">#DDDDDD</color>
- <color name="master_switch_background_dark">#191919</color>
</resources>
diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml
index c398dfa8d..463aa70c8 100644
--- a/core/src/main/res/values/styles.xml
+++ b/core/src/main/res/values/styles.xml
@@ -1,36 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
- <style name="Theme.AntennaPod.Light" parent="Theme.Base.AntennaPod.Light">
+ <style name="Theme.AntennaPod.Dynamic.Light" parent="Theme.Base.AntennaPod.Dynamic.Light">
<!-- Room for API dependent attributes -->
</style>
- <style name="Theme.Base.AntennaPod.Light" parent="Theme.Material3.Light">
- <item name="colorPrimary">@color/accent_light</item>
- <item name="colorAccent">@color/accent_light</item>
- <item name="colorSecondary">@color/accent_light</item>
- <item name="colorOnSecondary">@color/white</item>
+ <style name="Theme.Base.AntennaPod.Dynamic.Light" parent="Theme.Material3.DynamicColors.Light">
<item name="progressBarTheme">@style/ProgressBarLight</item>
- <item name="colorPrimaryDark">@color/accent_light</item>
- <item name="colorPrimaryContainer">@color/accent_light</item>
- <item name="colorOnPrimaryContainer">@color/white</item>
- <item name="android:windowBackground">@color/background_light</item>
- <item name="colorSurface">@color/background_light</item>
<item name="background_color">@color/background_light</item>
- <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar.Light</item>
+ <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar</item>
<item name="background_elevated">@color/background_elevated_light</item>
- <item name="master_switch_background">@color/master_switch_background_light</item>
- <item name="currently_playing_background">@color/highlight_light</item>
<item name="action_icon_color">@color/black</item>
- <item name="drawer_activated_color">@color/accent_light_alpha</item>
<item name="android:textAllCaps">false</item>
- <item name="android:textColorHint">@color/grey600</item>
<item name="seek_background">@color/seek_background_light</item>
- <item name="navigation_up">@drawable/navigation_up</item>
<item name="dragview_background">@drawable/ic_drag_lighttheme</item>
<item name="scrollbar_thumb">@drawable/scrollbar_thumb_light</item>
- <item name="card_background">#EFEEEE</item>
- <item name="card_background_playing">#D8D8D8</item>
<item name="icon_red">#CF1800</item>
<item name="icon_yellow">#F59F00</item>
<item name="icon_green">#008537</item>
@@ -41,37 +25,33 @@
<item name="android:windowContentTransitions" tools:targetApi="lollipop">true</item>
</style>
- <style name="Theme.AntennaPod.Dark" parent="Theme.Base.AntennaPod.Dark">
+ <style name="Theme.AntennaPod.Light" parent="Theme.AntennaPod.Dynamic.Light">
+ <item name="colorPrimary">@color/accent_light</item>
+ <item name="colorAccent">@color/accent_light</item>
+ <item name="colorSecondary">@color/accent_light</item>
+ <item name="colorOnSecondary">@color/white</item>
+ <item name="colorPrimaryDark">@color/accent_light</item>
+ <item name="colorPrimaryContainer">@color/accent_light</item>
+ <item name="colorOnPrimaryContainer">@color/white</item>
+ <item name="android:windowBackground">@color/background_light</item>
+ <item name="colorSurface">@color/background_light</item>
+ <item name="colorSurfaceVariant">#B8E4FF</item>
+ </style>
+
+ <style name="Theme.AntennaPod.Dynamic.Dark" parent="Theme.Base.AntennaPod.Dynamic.Dark">
<!-- Room for API dependent attributes -->
</style>
- <style name="Theme.Base.AntennaPod.Dark" parent="Theme.Material3.Dark">
- <item name="colorAccent">@color/accent_dark</item>
- <item name="colorSecondary">@color/accent_dark</item>
- <item name="colorOnSecondary">@color/black</item>
- <item name="colorPrimary">@color/accent_dark</item>
- <item name="colorPrimaryDark">@color/background_darktheme</item>
- <item name="colorPrimaryContainer">@color/accent_dark</item>
- <item name="colorOnPrimaryContainer">@color/black</item>
- <item name="android:windowBackground">@color/background_darktheme</item>
- <item name="colorSurface">@color/background_darktheme</item>
+ <style name="Theme.Base.AntennaPod.Dynamic.Dark" parent="Theme.Material3.DynamicColors.Dark">
+ <item name="progressBarTheme">@style/ProgressBarDark</item>
<item name="background_color">@color/background_darktheme</item>
- <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar.Dark</item>
+ <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar</item>
<item name="background_elevated">@color/background_elevated_darktheme</item>
- <item name="colorControlNormal">@color/white</item>
- <item name="progressBarTheme">@style/ProgressBarDark</item>
- <item name="drawer_activated_color">@color/accent_dark_alpha</item>
- <item name="master_switch_background">@color/master_switch_background_dark</item>
- <item name="currently_playing_background">@color/highlight_dark</item>
<item name="action_icon_color">@color/white</item>
<item name="android:textAllCaps">false</item>
- <item name="android:textColorHint">@color/medium_gray</item>
<item name="seek_background">@color/seek_background_dark</item>
- <item name="navigation_up">@drawable/navigation_up_dark</item>
<item name="dragview_background">@drawable/ic_drag_darktheme</item>
<item name="scrollbar_thumb">@drawable/scrollbar_thumb_dark</item>
- <item name="card_background">#2d3337</item>
- <item name="card_background_playing">#444D53</item>
<item name="icon_red">#CF1800</item>
<item name="icon_yellow">#F59F00</item>
<item name="icon_green">#008537</item>
@@ -85,33 +65,57 @@
<item name="android:navigationBarColor" tools:targetApi="lollipop">@color/background_darktheme</item>
</style>
- <style name="Theme.AntennaPod.TrueBlack" parent="Theme.Base.AntennaPod.TrueBlack">
- <!-- Room for API dependent attributes -->
+ <style name="Theme.AntennaPod.Dark" parent="Theme.AntennaPod.Dynamic.Dark">
+ <item name="colorPrimary">@color/accent_dark</item>
+ <item name="colorAccent">@color/accent_dark</item>
+ <item name="colorSecondary">@color/accent_dark</item>
+ <item name="colorOnSecondary">@color/black</item>
+ <item name="colorPrimaryDark">@color/accent_dark</item>
+ <item name="colorPrimaryContainer">@color/accent_dark</item>
+ <item name="colorOnPrimaryContainer">@color/black</item>
+ <item name="android:windowBackground">@color/background_darktheme</item>
+ <item name="colorSurface">@color/background_darktheme</item>
+ <item name="colorSurfaceVariant">#1B3B6A</item>
+ </style>
+
+ <style name="Theme.AntennaPod.Dynamic.TrueBlack" parent="Theme.AntennaPod.Dynamic.Dark">
+ <item name="android:textColorPrimary">@color/white</item>
+ <item name="android:color">@color/white</item>
+ <item name="android:windowBackground">@color/black</item>
+ <item name="colorSurface">@color/black</item>
+ <item name="background_color">@color/black</item>
+ <item name="background_elevated">@color/black</item>
+ <item name="android:navigationBarColor" tools:targetApi="lollipop">@color/black</item>
</style>
- <style name="Theme.Base.AntennaPod.TrueBlack" parent="Theme.AntennaPod.Dark">
- <item name="colorPrimaryDark">@color/black</item>
- <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar.Black</item>
- <item name="drawer_activated_color">@color/highlight_trueblack</item>
- <item name="currently_playing_background">@color/highlight_trueblack</item>
+ <style name="Theme.AntennaPod.TrueBlack" parent="Theme.AntennaPod.Dark">
<item name="android:textColorPrimary">@color/white</item>
<item name="android:color">@color/white</item>
- <item name="android:colorBackground">@color/black</item>
<item name="android:windowBackground">@color/black</item>
<item name="colorSurface">@color/black</item>
<item name="background_color">@color/black</item>
- <item name="android:actionBarStyle">@color/black</item>
<item name="background_elevated">@color/black</item>
- <item name="android:textColorHint">@color/medium_gray</item>
<item name="android:navigationBarColor" tools:targetApi="lollipop">@color/black</item>
</style>
+ <style name="Theme.AntennaPod.Dynamic.Light.NoTitle" parent="Theme.AntennaPod.Dynamic.Light">
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ <item name="windowActionModeOverlay">true</item>
+ </style>
+
<style name="Theme.AntennaPod.Light.NoTitle" parent="Theme.AntennaPod.Light">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="windowActionModeOverlay">true</item>
</style>
+ <style name="Theme.AntennaPod.Dynamic.Dark.NoTitle" parent="Theme.AntennaPod.Dynamic.Dark">
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ <item name="windowActionModeOverlay">true</item>
+ </style>
+
<style name="Theme.AntennaPod.Dark.NoTitle" parent="Theme.AntennaPod.Dark">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
@@ -124,6 +128,23 @@
<item name="windowActionModeOverlay">true</item>
</style>
+ <style name="Theme.AntennaPod.Dynamic.TrueBlack.NoTitle" parent="Theme.AntennaPod.Dynamic.TrueBlack">
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ <item name="windowActionModeOverlay">true</item>
+ </style>
+
+ <style name="Theme.AntennaPod.Dynamic.Light.Translucent" parent="Theme.AntennaPod.Dynamic.Light.NoTitle">
+ <item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
+ <item name="android:windowLightStatusBar" tools:targetApi="M">false</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:backgroundDimEnabled">true</item>
+ <item name="android:windowAnimationStyle">@style/AnimationFade</item>
+ <item name="android:fitsSystemWindows">true</item>
+ </style>
+
<style name="Theme.AntennaPod.Light.Translucent" parent="Theme.AntennaPod.Light.NoTitle">
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
<item name="android:windowLightStatusBar" tools:targetApi="M">false</item>
@@ -135,6 +156,17 @@
<item name="android:fitsSystemWindows">true</item>
</style>
+ <style name="Theme.AntennaPod.Dynamic.Dark.Translucent" parent="Theme.AntennaPod.Dynamic.Dark.NoTitle">
+ <item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
+ <item name="android:windowLightStatusBar" tools:targetApi="M">false</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:backgroundDimEnabled">true</item>
+ <item name="android:windowAnimationStyle">@style/AnimationFade</item>
+ <item name="android:fitsSystemWindows">true</item>
+ </style>
+
<style name="Theme.AntennaPod.Dark.Translucent" parent="Theme.AntennaPod.Dark.NoTitle">
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
<item name="android:windowLightStatusBar" tools:targetApi="M">false</item>
@@ -146,6 +178,17 @@
<item name="android:fitsSystemWindows">true</item>
</style>
+ <style name="Theme.AntennaPod.Dynamic.TrueBlack.Translucent" parent="Theme.AntennaPod.Dynamic.TrueBlack.NoTitle">
+ <item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
+ <item name="android:windowLightStatusBar" tools:targetApi="M">false</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:backgroundDimEnabled">true</item>
+ <item name="android:windowAnimationStyle">@style/AnimationFade</item>
+ <item name="android:fitsSystemWindows">true</item>
+ </style>
+
<style name="Theme.AntennaPod.TrueBlack.Translucent" parent="Theme.AntennaPod.TrueBlack.NoTitle">
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
<item name="android:windowLightStatusBar" tools:targetApi="M">false</item>
@@ -199,14 +242,6 @@
<item name="android:ellipsize">end</item>
</style>
- <style name="BigBlurryBackground">
- <item name="android:scaleType">centerCrop</item>
- <!-- <item name="android:tint">@color/image_readability_tint</item> -->
- <!-- Reactivate when Glide's tinting has been fixed for Android 5.x
- Remove color filter from ItemlistFragment -->
-
- </style>
-
<style name="ProgressBarLight">
<item name="android:indeterminateOnly">false</item>
<item name="android:progressDrawable">@drawable/progress_bar_horizontal_light</item>
@@ -226,16 +261,9 @@
<item name="fastScrollVerticalTrackDrawable">@drawable/scrollbar_track</item>
</style>
- <style name="Widget.AntennaPod.ActionBar.Light" parent="Widget.Material3.Light.ActionBar.Solid">
- <item name="background">@color/background_light</item>
- </style>
-
- <style name="Widget.AntennaPod.ActionBar.Dark" parent="Widget.Material3.Light.ActionBar.Solid">
- <item name="background">@color/background_darktheme</item>
- </style>
-
- <style name="Widget.AntennaPod.ActionBar.Black" parent="Widget.Material3.Light.ActionBar.Solid">
- <item name="background">@color/black</item>
+ <style name="Widget.AntennaPod.ActionBar" parent="Widget.Material3.Light.ActionBar.Solid">
+ <item name="background">?android:attr/colorBackground</item>
+ <item name="elevation">0dp</item>
</style>
<style name="AddPodcastTextView">
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<String> getHiddenDrawerItems() {
String hiddenItems = prefs.getString(PREF_HIDDEN_DRAWER_ITEMS, "");
return new ArrayList<>(Arrays.asList(TextUtils.split(hiddenItems, ",")));
diff --git a/ui/i18n/src/main/res/values/strings.xml b/ui/i18n/src/main/res/values/strings.xml
index b2ec9e0fe..a66f435dd 100644
--- a/ui/i18n/src/main/res/values/strings.xml
+++ b/ui/i18n/src/main/res/values/strings.xml
@@ -431,6 +431,8 @@
<string name="user_interface_label">User Interface</string>
<string name="user_interface_sum">Appearance, Subscriptions, Lockscreen</string>
<string name="pref_set_theme_title">Select Theme</string>
+ <string name="pref_tinted_theme_title">Use Tinted Colors</string>
+ <string name="pref_tinted_theme_message">Tint app colors based on the background image</string>
<string name="pref_nav_drawer_items_title">Set Navigation Drawer items</string>
<string name="pref_nav_drawer_items_sum">Change which items appear in the navigation drawer.</string>
<string name="pref_nav_drawer_feed_order_title">Set Subscription Order</string>