diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2024-03-17 18:43:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-17 18:43:55 +0100 |
commit | 0cbd97b5cbffa5ba1b2458a2b33248e98a376d7e (patch) | |
tree | b1967d54efbcc71bc07bd8ef40f0d371c8b0f292 /ui/common | |
parent | 17f5a5d1b85f07bada36abe6541ed0fc1e1d83a2 (diff) | |
download | AntennaPod-0cbd97b5cbffa5ba1b2458a2b33248e98a376d7e.zip |
Move theme to :ui:common module (#6997)
This enables creating Activities outside the app and core modules
Diffstat (limited to 'ui/common')
45 files changed, 821 insertions, 0 deletions
diff --git a/ui/common/build.gradle b/ui/common/build.gradle index 2771cac72..26db9f9e4 100644 --- a/ui/common/build.gradle +++ b/ui/common/build.gradle @@ -8,10 +8,12 @@ android { } dependencies { + implementation project(":storage:preferences") implementation project(":ui:i18n") annotationProcessor "androidx.annotation:annotation:$annotationVersion" implementation "androidx.appcompat:appcompat:$appcompatVersion" implementation "androidx.viewpager2:viewpager2:$viewPager2Version" implementation "com.google.android.material:material:$googleMaterialVersion" + implementation "androidx.core:core-splashscreen:1.0.0" } diff --git a/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java new file mode 100644 index 000000000..05fb2dcbc --- /dev/null +++ b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java @@ -0,0 +1,123 @@ +package de.danoeh.antennapod.ui.common; + +import android.content.Context; + +import android.content.res.Resources; +import java.util.Locale; + +/** Provides methods for converting various units. */ +public final class Converter { + /** Class shall not be instantiated. */ + private Converter() { + } + + private static final int HOURS_MIL = 3600000; + private static final int MINUTES_MIL = 60000; + private static final int SECONDS_MIL = 1000; + + /** + * Converts milliseconds to a string containing hours, minutes and seconds. + */ + public static String getDurationStringLong(int duration) { + if (duration <= 0) { + return "00:00:00"; + } else { + int[] hms = millisecondsToHms(duration); + return String.format(Locale.getDefault(), "%02d:%02d:%02d", hms[0], hms[1], hms[2]); + } + } + + private static int[] millisecondsToHms(long duration) { + int h = (int) (duration / HOURS_MIL); + long rest = duration - h * HOURS_MIL; + int m = (int) (rest / MINUTES_MIL); + rest -= m * MINUTES_MIL; + int s = (int) (rest / SECONDS_MIL); + return new int[] {h, m, s}; + } + + /** + * Converts milliseconds to a string containing hours and minutes or minutes and seconds. + */ + public static String getDurationStringShort(int duration, boolean durationIsInHours) { + int firstPartBase = durationIsInHours ? HOURS_MIL : MINUTES_MIL; + int firstPart = duration / firstPartBase; + int leftoverFromFirstPart = duration - firstPart * firstPartBase; + int secondPart = leftoverFromFirstPart / (durationIsInHours ? MINUTES_MIL : SECONDS_MIL); + + return String.format(Locale.getDefault(), "%02d:%02d", firstPart, secondPart); + } + + /** + * Converts long duration string (HH:MM:SS) to milliseconds. + */ + public static int durationStringLongToMs(String input) { + String[] parts = input.split(":"); + if (parts.length != 3) { + return 0; + } + return Integer.parseInt(parts[0]) * 3600 * 1000 + + Integer.parseInt(parts[1]) * 60 * 1000 + + Integer.parseInt(parts[2]) * 1000; + } + + /** + * Converts short duration string (XX:YY) to milliseconds. If durationIsInHours is true then the + * format is HH:MM, otherwise it's MM:SS. + */ + public static int durationStringShortToMs(String input, boolean durationIsInHours) { + String[] parts = input.split(":"); + if (parts.length != 2) { + return 0; + } + + int modifier = durationIsInHours ? 60 : 1; + + return Integer.parseInt(parts[0]) * 60 * 1000 * modifier + + Integer.parseInt(parts[1]) * 1000 * modifier; + } + + /** + * Converts milliseconds to a localized string containing hours and minutes. + */ + public static String getDurationStringLocalized(Context context, long duration) { + return getDurationStringLocalized(context.getResources(), duration, false); + } + + public static String getDurationStringLocalized(Resources resources, long duration, boolean includeDays) { + String result = ""; + int h = (int) (duration / HOURS_MIL); + int d = h / 24; + if (!includeDays) { + d = 0; + } else if (d > 0) { + String days = resources.getQuantityString(R.plurals.time_days_quantified, d, d); + result += days.replace(" ", "\u00A0") + " "; + h -= d * 24; + } + int rest = (int) (duration - (d * 24 + h) * HOURS_MIL); + int m = rest / MINUTES_MIL; + if (h > 0) { + String hours = resources.getQuantityString(R.plurals.time_hours_quantified, h, h); + result += hours.replace(" ", "\u00A0"); + if (d == 0) { + result += " "; + } + } + if (d == 0) { + String minutes = resources.getQuantityString(R.plurals.time_minutes_quantified, m, m); + result += minutes.replace(" ", "\u00A0"); + } + return result; + } + + /** + * Converts seconds to a localized representation. + * @param time The time in seconds + * @return "HH:MM hours" + */ + public static String shortLocalizedDuration(Context context, long time) { + float hours = (float) time / 3600f; + return String.format(Locale.getDefault(), "%.1f ", hours) + context.getString(R.string.time_hours); + } +} diff --git a/ui/common/src/main/java/de/danoeh/antennapod/ui/common/DateFormatter.java b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/DateFormatter.java new file mode 100644 index 000000000..1bf4fad23 --- /dev/null +++ b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/DateFormatter.java @@ -0,0 +1,39 @@ +package de.danoeh.antennapod.ui.common; + +import android.content.Context; + +import java.text.DateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; + +/** + * Formats dates. + */ +public class DateFormatter { + private DateFormatter() { + + } + + public static String formatAbbrev(final Context context, final Date date) { + if (date == null) { + return ""; + } + GregorianCalendar now = new GregorianCalendar(); + GregorianCalendar cal = new GregorianCalendar(); + cal.setTime(date); + boolean withinLastYear = now.get(Calendar.YEAR) == cal.get(Calendar.YEAR); + int format = android.text.format.DateUtils.FORMAT_ABBREV_ALL; + if (withinLastYear) { + format |= android.text.format.DateUtils.FORMAT_NO_YEAR; + } + return android.text.format.DateUtils.formatDateTime(context, date.getTime(), format); + } + + public static String formatForAccessibility(final Date date) { + if (date == null) { + return ""; + } + return DateFormat.getDateInstance(DateFormat.LONG).format(date); + } +} diff --git a/ui/common/src/main/java/de/danoeh/antennapod/ui/common/ThemeSwitcher.java b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/ThemeSwitcher.java new file mode 100644 index 000000000..9efb4e0f7 --- /dev/null +++ b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/ThemeSwitcher.java @@ -0,0 +1,72 @@ +package de.danoeh.antennapod.ui.common; + +import android.content.Context; +import android.content.res.Configuration; +import androidx.annotation.StyleRes; +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 dynamic ? R.style.Theme_AntennaPod_Dynamic_Dark : R.style.Theme_AntennaPod_Dark; + case BLACK: + return dynamic ? R.style.Theme_AntennaPod_Dynamic_TrueBlack : R.style.Theme_AntennaPod_TrueBlack; + case LIGHT: // fall-through + default: + 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 dynamic ? R.style.Theme_AntennaPod_Dynamic_Dark_NoTitle : R.style.Theme_AntennaPod_Dark_NoTitle; + case BLACK: + return dynamic ? R.style.Theme_AntennaPod_Dynamic_TrueBlack_NoTitle + : R.style.Theme_AntennaPod_TrueBlack_NoTitle; + case LIGHT: // fall-through + default: + 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 dynamic ? R.style.Theme_AntennaPod_Dynamic_Dark_Translucent + : R.style.Theme_AntennaPod_Dark_Translucent; + case BLACK: + return dynamic ? R.style.Theme_AntennaPod_Dynamic_TrueBlack_Translucent + : R.style.Theme_AntennaPod_TrueBlack_Translucent; + case LIGHT: // fall-through + default: + return dynamic ? R.style.Theme_AntennaPod_Dynamic_Light_Translucent + : R.style.Theme_AntennaPod_Light_Translucent; + } + } + + private static UserPreferences.ThemePreference readThemeValue(Context context) { + UserPreferences.ThemePreference theme = UserPreferences.getTheme(); + if (theme == UserPreferences.ThemePreference.SYSTEM) { + int nightMode = context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; + if (nightMode == Configuration.UI_MODE_NIGHT_YES) { + theme = UserPreferences.ThemePreference.DARK; + } else { + theme = UserPreferences.ThemePreference.LIGHT; + + } + } + if (theme == UserPreferences.ThemePreference.DARK && UserPreferences.getIsBlackTheme()) { + theme = UserPreferences.ThemePreference.BLACK; + } + return theme; + } +} diff --git a/ui/common/src/main/res/color/button_bg_selector.xml b/ui/common/src/main/res/color/button_bg_selector.xml new file mode 100644 index 000000000..f416daa72 --- /dev/null +++ b/ui/common/src/main/res/color/button_bg_selector.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- Difference to Material Components: alpha is 0.3 instead of 0.08 --> + <item android:alpha="0.3" android:color="?attr/colorPrimary" android:state_checked="true"/> + <item android:color="@android:color/transparent" android:state_checked="false"/> +</selector>
\ No newline at end of file diff --git a/ui/common/src/main/res/drawable-nodpi/launcher_animate_bg.png b/ui/common/src/main/res/drawable-nodpi/launcher_animate_bg.png Binary files differnew file mode 100644 index 000000000..00eb3a2d6 --- /dev/null +++ b/ui/common/src/main/res/drawable-nodpi/launcher_animate_bg.png diff --git a/ui/common/src/main/res/drawable-nodpi/launcher_animate_wave1.png b/ui/common/src/main/res/drawable-nodpi/launcher_animate_wave1.png Binary files differnew file mode 100644 index 000000000..432e497c3 --- /dev/null +++ b/ui/common/src/main/res/drawable-nodpi/launcher_animate_wave1.png diff --git a/ui/common/src/main/res/drawable-nodpi/launcher_animate_wave2.png b/ui/common/src/main/res/drawable-nodpi/launcher_animate_wave2.png Binary files differnew file mode 100644 index 000000000..16d4e5023 --- /dev/null +++ b/ui/common/src/main/res/drawable-nodpi/launcher_animate_wave2.png diff --git a/ui/common/src/main/res/drawable-nodpi/teaser.webp b/ui/common/src/main/res/drawable-nodpi/teaser.webp Binary files differnew file mode 100644 index 000000000..1f1e4a4a3 --- /dev/null +++ b/ui/common/src/main/res/drawable-nodpi/teaser.webp diff --git a/ui/common/src/main/res/drawable/bg_pill_translucent.xml b/ui/common/src/main/res/drawable/bg_pill_translucent.xml new file mode 100644 index 000000000..b25a9ac82 --- /dev/null +++ b/ui/common/src/main/res/drawable/bg_pill_translucent.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> + <solid android:color="#D2404040" /> + <corners android:radius="18dp" /> +</shape> diff --git a/ui/common/src/main/res/drawable/ic_drag_darktheme.xml b/ui/common/src/main/res/drawable/ic_drag_darktheme.xml new file mode 100644 index 000000000..20c7db484 --- /dev/null +++ b/ui/common/src/main/res/drawable/ic_drag_darktheme.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="20dp" + android:height="30dp" + android:viewportWidth="3" + android:viewportHeight="4.5"> + <path + android:pathData="M 0.75 0.25 A 0.5 0.5 0 0 0 0.25 0.75 A 0.5 0.5 135 0 0 0.75 1.25 A 0.5 0.5 0 0 0 1.25 0.75 A 0.5 0.5 45 0 0 0.75 0.25 z M 2.25 0.25 A 0.5 0.5 0 0 0 1.75 0.75 A 0.5 0.5 0 0 0 2.25 1.25 A 0.5 0.5 0 0 0 2.75 0.75 A 0.5 0.5 0 0 0 2.25 0.25 z M 0.75 1.75 A 0.5 0.5 0 0 0 0.25 2.25 A 0.5 0.5 0 0 0 0.75 2.75 A 0.5 0.5 0 0 0 1.25 2.25 A 0.5 0.5 0 0 0 0.75 1.75 z M 2.25 1.75 A 0.5 0.5 0 0 0 1.75 2.25 A 0.5 0.5 0 0 0 2.25 2.75 A 0.5 0.5 0 0 0 2.75 2.25 A 0.5 0.5 0 0 0 2.25 1.75 z M 0.75 3.25 A 0.5 0.5 0 0 0 0.25 3.75 A 0.5 0.5 45 0 0 0.75 4.25 A 0.5 0.5 45 0 0 1.25 3.75 A 0.5 0.5 0 0 0 0.75 3.25 z M 2.25 3.25 A 0.5 0.5 0 0 0 1.75 3.75 A 0.5 0.5 45 0 0 2.25 4.25 A 0.5 0.5 45 0 0 2.75 3.75 A 0.5 0.5 0 0 0 2.25 3.25 z" + android:fillColor="#a9a9a9"/> +</vector> diff --git a/ui/common/src/main/res/drawable/ic_drag_lighttheme.xml b/ui/common/src/main/res/drawable/ic_drag_lighttheme.xml new file mode 100644 index 000000000..46ff2f495 --- /dev/null +++ b/ui/common/src/main/res/drawable/ic_drag_lighttheme.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="20dp" + android:height="30dp" + android:viewportWidth="3" + android:viewportHeight="4.5"> + <path + android:pathData="M 0.75 0.25 A 0.5 0.5 0 0 0 0.25 0.75 A 0.5 0.5 135 0 0 0.75 1.25 A 0.5 0.5 0 0 0 1.25 0.75 A 0.5 0.5 45 0 0 0.75 0.25 z M 2.25 0.25 A 0.5 0.5 0 0 0 1.75 0.75 A 0.5 0.5 0 0 0 2.25 1.25 A 0.5 0.5 0 0 0 2.75 0.75 A 0.5 0.5 0 0 0 2.25 0.25 z M 0.75 1.75 A 0.5 0.5 0 0 0 0.25 2.25 A 0.5 0.5 0 0 0 0.75 2.75 A 0.5 0.5 0 0 0 1.25 2.25 A 0.5 0.5 0 0 0 0.75 1.75 z M 2.25 1.75 A 0.5 0.5 0 0 0 1.75 2.25 A 0.5 0.5 0 0 0 2.25 2.75 A 0.5 0.5 0 0 0 2.75 2.25 A 0.5 0.5 0 0 0 2.25 1.75 z M 0.75 3.25 A 0.5 0.5 0 0 0 0.25 3.75 A 0.5 0.5 45 0 0 0.75 4.25 A 0.5 0.5 45 0 0 1.25 3.75 A 0.5 0.5 0 0 0 0.75 3.25 z M 2.25 3.25 A 0.5 0.5 0 0 0 1.75 3.75 A 0.5 0.5 45 0 0 2.25 4.25 A 0.5 0.5 45 0 0 2.75 3.75 A 0.5 0.5 0 0 0 2.25 3.25 z" + android:fillColor="#9d9d9d"/> +</vector> diff --git a/ui/common/src/main/res/drawable/launcher_animate.xml b/ui/common/src/main/res/drawable/launcher_animate.xml new file mode 100644 index 000000000..189a01d26 --- /dev/null +++ b/ui/common/src/main/res/drawable/launcher_animate.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<animation-list + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:oneshot="false"> + + <item android:duration="1000"> + <aapt:attr name="android:drawable"> + <layer-list> + <item android:drawable="@drawable/launcher_animate_bg" /> + <item android:drawable="@drawable/launcher_animate_wave1" /> + <item android:drawable="@drawable/launcher_animate_wave2" /> + </layer-list> + </aapt:attr> + </item> + + <item android:duration="80"> + <aapt:attr name="android:drawable"> + <layer-list> + <item android:drawable="@drawable/launcher_animate_bg" /> + <item android:drawable="@drawable/launcher_animate_wave1" /> + </layer-list> + </aapt:attr> + </item> + + <item android:duration="200"> + <aapt:attr name="android:drawable"> + <layer-list> + <item android:drawable="@drawable/launcher_animate_bg" /> + </layer-list> + </aapt:attr> + </item> + + <item android:duration="80"> + <aapt:attr name="android:drawable"> + <layer-list> + <item android:drawable="@drawable/launcher_animate_bg" /> + <item android:drawable="@drawable/launcher_animate_wave1" /> + </layer-list> + </aapt:attr> + </item> + +</animation-list> + + diff --git a/ui/common/src/main/res/drawable/progress_bar_horizontal_dark.xml b/ui/common/src/main/res/drawable/progress_bar_horizontal_dark.xml new file mode 100644 index 000000000..b575c2f80 --- /dev/null +++ b/ui/common/src/main/res/drawable/progress_bar_horizontal_dark.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:id="@android:id/background"> + <shape> + <solid android:color="#19FFFFFF"/> + </shape> + </item> + <item android:id="@android:id/progress"> + <clip> + <shape> + <solid android:color="?attr/colorAccent"/> + </shape> + </clip> + </item> +</layer-list> diff --git a/ui/common/src/main/res/drawable/progress_bar_horizontal_light.xml b/ui/common/src/main/res/drawable/progress_bar_horizontal_light.xml new file mode 100644 index 000000000..b2e18c988 --- /dev/null +++ b/ui/common/src/main/res/drawable/progress_bar_horizontal_light.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:id="@android:id/background"> + <shape> + <solid android:color="#19212121"/> + </shape> + </item> + <item android:id="@android:id/progress"> + <clip> + <shape> + <solid android:color="?attr/colorAccent"/> + </shape> + </clip> + </item> +</layer-list> diff --git a/ui/common/src/main/res/drawable/scrollbar_thumb_dark.xml b/ui/common/src/main/res/drawable/scrollbar_thumb_dark.xml new file mode 100644 index 000000000..929c03914 --- /dev/null +++ b/ui/common/src/main/res/drawable/scrollbar_thumb_dark.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_pressed="true" android:drawable="@drawable/scrollbar_thumb_pressed_dark"/> + <item android:drawable="@drawable/scrollbar_thumb_default"/> +</selector> diff --git a/ui/common/src/main/res/drawable/scrollbar_thumb_default.xml b/ui/common/src/main/res/drawable/scrollbar_thumb_default.xml new file mode 100644 index 000000000..5e8a98b44 --- /dev/null +++ b/ui/common/src/main/res/drawable/scrollbar_thumb_default.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape android:shape="rectangle"> + <size android:height="24dp" android:width="24dp"/> + </shape> + </item> + <item android:gravity="end"> + <shape android:shape="rectangle"> + <solid android:color="#99666666"/> + <size android:height="4dp" android:width="4dp"/> + </shape> + </item> +</layer-list> diff --git a/ui/common/src/main/res/drawable/scrollbar_thumb_light.xml b/ui/common/src/main/res/drawable/scrollbar_thumb_light.xml new file mode 100644 index 000000000..a13cfd705 --- /dev/null +++ b/ui/common/src/main/res/drawable/scrollbar_thumb_light.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_pressed="true" android:drawable="@drawable/scrollbar_thumb_pressed_light"/> + <item android:drawable="@drawable/scrollbar_thumb_default"/> +</selector> diff --git a/ui/common/src/main/res/drawable/scrollbar_thumb_pressed_dark.xml b/ui/common/src/main/res/drawable/scrollbar_thumb_pressed_dark.xml new file mode 100644 index 000000000..a1618c5b6 --- /dev/null +++ b/ui/common/src/main/res/drawable/scrollbar_thumb_pressed_dark.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape android:shape="rectangle"> + <size android:height="24dp" android:width="24dp"/> + </shape> + </item> + <item android:gravity="end"> + <shape android:shape="rectangle"> + <solid android:color="@color/accent_dark"/> + <size android:height="4dp" android:width="4dp"/> + </shape> + </item> +</layer-list> diff --git a/ui/common/src/main/res/drawable/scrollbar_thumb_pressed_light.xml b/ui/common/src/main/res/drawable/scrollbar_thumb_pressed_light.xml new file mode 100644 index 000000000..be684541a --- /dev/null +++ b/ui/common/src/main/res/drawable/scrollbar_thumb_pressed_light.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape android:shape="rectangle"> + <size android:height="24dp" android:width="24dp"/> + </shape> + </item> + <item android:gravity="end"> + <shape android:shape="rectangle"> + <solid android:color="@color/accent_light"/> + <size android:height="4dp" android:width="4dp"/> + </shape> + </item> +</layer-list> diff --git a/ui/common/src/main/res/drawable/scrollbar_track.xml b/ui/common/src/main/res/drawable/scrollbar_track.xml new file mode 100644 index 000000000..ce838abe9 --- /dev/null +++ b/ui/common/src/main/res/drawable/scrollbar_track.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@android:color/transparent"/> +</selector> diff --git a/ui/common/src/main/res/layout/preference_material_switch.xml b/ui/common/src/main/res/layout/preference_material_switch.xml new file mode 100644 index 000000000..b39e6b00f --- /dev/null +++ b/ui/common/src/main/res/layout/preference_material_switch.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Derived from https://github.com/androidx/androidx/blob/8cb282cc/preference/preference/res/layout/preference_widget_switch_compat.xml --> +<com.google.android.material.materialswitch.MaterialSwitch + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/switchWidget" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@null" + android:clickable="false" + android:focusable="false" /> diff --git a/ui/common/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/ui/common/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 000000000..9764d2aa9 --- /dev/null +++ b/ui/common/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@mipmap/ic_launcher_background"/> + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> + <monochrome android:drawable="@mipmap/ic_launcher_monochrome"/> +</adaptive-icon>
\ No newline at end of file diff --git a/ui/common/src/main/res/mipmap-hdpi/ic_launcher.png b/ui/common/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..efda51a0e --- /dev/null +++ b/ui/common/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/ui/common/src/main/res/mipmap-hdpi/ic_launcher_background.png b/ui/common/src/main/res/mipmap-hdpi/ic_launcher_background.png Binary files differnew file mode 100644 index 000000000..3b5e329e5 --- /dev/null +++ b/ui/common/src/main/res/mipmap-hdpi/ic_launcher_background.png diff --git a/ui/common/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/ui/common/src/main/res/mipmap-hdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 000000000..b52ad5dd6 --- /dev/null +++ b/ui/common/src/main/res/mipmap-hdpi/ic_launcher_foreground.png diff --git a/ui/common/src/main/res/mipmap-mdpi/ic_launcher.png b/ui/common/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..9c2a5867a --- /dev/null +++ b/ui/common/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/ui/common/src/main/res/mipmap-mdpi/ic_launcher_background.png b/ui/common/src/main/res/mipmap-mdpi/ic_launcher_background.png Binary files differnew file mode 100644 index 000000000..38164a0b0 --- /dev/null +++ b/ui/common/src/main/res/mipmap-mdpi/ic_launcher_background.png diff --git a/ui/common/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/ui/common/src/main/res/mipmap-mdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 000000000..236f6fca2 --- /dev/null +++ b/ui/common/src/main/res/mipmap-mdpi/ic_launcher_foreground.png diff --git a/ui/common/src/main/res/mipmap-xhdpi/ic_launcher.png b/ui/common/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..a58294b36 --- /dev/null +++ b/ui/common/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/ui/common/src/main/res/mipmap-xhdpi/ic_launcher_background.png b/ui/common/src/main/res/mipmap-xhdpi/ic_launcher_background.png Binary files differnew file mode 100644 index 000000000..7bf8bf8a7 --- /dev/null +++ b/ui/common/src/main/res/mipmap-xhdpi/ic_launcher_background.png diff --git a/ui/common/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/ui/common/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 000000000..03cf16e53 --- /dev/null +++ b/ui/common/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png diff --git a/ui/common/src/main/res/mipmap-xxhdpi/ic_launcher.png b/ui/common/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..0245e6394 --- /dev/null +++ b/ui/common/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/ui/common/src/main/res/mipmap-xxhdpi/ic_launcher_background.png b/ui/common/src/main/res/mipmap-xxhdpi/ic_launcher_background.png Binary files differnew file mode 100644 index 000000000..e1982893d --- /dev/null +++ b/ui/common/src/main/res/mipmap-xxhdpi/ic_launcher_background.png diff --git a/ui/common/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/ui/common/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 000000000..e6a824939 --- /dev/null +++ b/ui/common/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png diff --git a/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..998bfdea8 --- /dev/null +++ b/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png b/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png Binary files differnew file mode 100644 index 000000000..8db9c15a8 --- /dev/null +++ b/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png diff --git a/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 000000000..ccc00751c --- /dev/null +++ b/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png diff --git a/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png Binary files differnew file mode 100644 index 000000000..ae9ba36ea --- /dev/null +++ b/ui/common/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png diff --git a/ui/common/src/main/res/values-v23/styles.xml b/ui/common/src/main/res/values-v23/styles.xml new file mode 100644 index 000000000..95740f648 --- /dev/null +++ b/ui/common/src/main/res/values-v23/styles.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android"> + <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 --> + <item name="android:navigationBarColor">@color/grey600</item> + </style> +</resources> diff --git a/ui/common/src/main/res/values-v27/styles.xml b/ui/common/src/main/res/values-v27/styles.xml new file mode 100644 index 000000000..df4d786be --- /dev/null +++ b/ui/common/src/main/res/values-v27/styles.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android"> + <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> + <item name="android:navigationBarDividerColor">@color/navigation_bar_divider_light</item> + <item name="android:windowLightNavigationBar">true</item> + </style> +</resources> diff --git a/ui/common/src/main/res/values/attrs.xml b/ui/common/src/main/res/values/attrs.xml new file mode 100644 index 000000000..57fde8e10 --- /dev/null +++ b/ui/common/src/main/res/values/attrs.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <attr name="dragview_background" format="reference"/> + <attr name="progressBarTheme" format="reference"/> + <attr name="action_icon_color" format="color"/> + <attr name="scrollbar_thumb" format="reference"/> + <attr name="background_color" format="color"/> + <attr name="background_elevated" format="color"/> + <attr name="seek_background" format="color" /> + <attr name="icon_red" format="color" /> + <attr name="icon_yellow" format="color" /> + <attr name="icon_green" format="color" /> + <attr name="icon_purple" format="color" /> + <attr name="icon_gray" format="color" /> +</resources> diff --git a/ui/common/src/main/res/values/colors.xml b/ui/common/src/main/res/values/colors.xml new file mode 100644 index 000000000..ad835faf4 --- /dev/null +++ b/ui/common/src/main/res/values/colors.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <color name="white">#FFFFFF</color> + <color name="grey100">#f5f5f5</color> + <color name="grey600">#757575</color> + <color name="light_gray">#bfbfbf</color> + <color name="medium_gray">#afafaf</color> + <color name="black">#000000</color> + <color name="image_readability_tint">#80000000</color> + <color name="feed_image_bg">#50000000</color> + <color name="feed_text_bg">#55333333</color> + + <!-- Theme colors --> + <color name="background_light">#FFFFFF</color> + <color name="background_elevated_light">#EFEEEE</color> + <color name="background_darktheme">#21272b</color> + <color name="background_elevated_darktheme">#2D3337</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_dark">#3D8BFF</color> + + <color name="gradient_000">#364ff3</color> + <color name="gradient_025">#2E6FF6</color> + <color name="gradient_075">#1EB0FC</color> + <color name="gradient_100">#16d0ff</color> +</resources> diff --git a/ui/common/src/main/res/values/dimens.xml b/ui/common/src/main/res/values/dimens.xml new file mode 100644 index 000000000..68d0e59ab --- /dev/null +++ b/ui/common/src/main/res/values/dimens.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <dimen name="widget_margin">0dp</dimen> + <dimen name="widget_inner_radius">4dp</dimen> + <dimen name="external_player_height">64dp</dimen> + <dimen name="text_size_micro">12sp</dimen> + <dimen name="text_size_small">14sp</dimen> + <dimen name="text_size_navdrawer">16sp</dimen> + <dimen name="text_size_large">22sp</dimen> + <dimen name="thumbnail_length_itemlist">56dp</dimen> + <dimen name="thumbnail_length_queue_item">56dp</dimen> + <dimen name="thumbnail_length_onlinefeedview">92dp</dimen> + <dimen name="feeditemlist_header_height">132dp</dimen> + <dimen name="thumbnail_length_navlist">40dp</dimen> + <dimen name="listitem_iconwithtext_height">48dp</dimen> + <dimen name="listitem_iconwithtext_textleftpadding">16dp</dimen> + + <dimen name="listitem_threeline_textleftpadding">16dp</dimen> + <dimen name="listitem_threeline_textrightpadding">8dp</dimen> + <dimen name="listitem_threeline_verticalpadding">8dp</dimen> + + <dimen name="list_vertical_padding">8dp</dimen> + <dimen name="listitem_icon_leftpadding">16dp</dimen> + + <dimen name="audioplayer_playercontrols_length">48dp</dimen> + <dimen name="audioplayer_playercontrols_length_big">64dp</dimen> + <dimen name="audioplayer_playercontrols_margin">12dp</dimen> + + <dimen name="nav_drawer_max_screen_size">480dp</dimen> +</resources> diff --git a/ui/common/src/main/res/values/styles.xml b/ui/common/src/main/res/values/styles.xml new file mode 100644 index 000000000..da227d163 --- /dev/null +++ b/ui/common/src/main/res/values/styles.xml @@ -0,0 +1,314 @@ +<?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.Dynamic.Light" parent="Theme.Base.AntennaPod.Dynamic.Light"> + <!-- Room for API dependent attributes --> + + <!-- To make icons visible on API 21-23. Overwritten in API-specific folder --> + <item name="android:statusBarColor">@color/grey600</item> + <item name="android:navigationBarColor">@color/grey600</item> + </style> + + <style name="Theme.Base.AntennaPod.Dynamic.Light" parent="Theme.Material3.DynamicColors.Light"> + <item name="progressBarTheme">@style/ProgressBarLight</item> + <item name="background_color">@color/background_light</item> + <item name="actionBarStyle">@style/Widget.AntennaPod.ActionBar</item> + <item name="background_elevated">@color/background_elevated_light</item> + <item name="action_icon_color">@color/black</item> + <item name="android:textAllCaps">false</item> + <item name="seek_background">@color/seek_background_light</item> + <item name="dragview_background">@drawable/ic_drag_lighttheme</item> + <item name="scrollbar_thumb">@drawable/scrollbar_thumb_light</item> + <item name="icon_red">#CF1800</item> + <item name="icon_yellow">#F59F00</item> + <item name="icon_green">#008537</item> + <item name="icon_purple">#5F1984</item> + <item name="icon_gray">#25365A</item> + <item name="android:splitMotionEvents">false</item> + <item name="android:fitsSystemWindows">false</item> + <item name="android:windowContentTransitions">true</item> + <item name="preferenceTheme">@style/AppPreferenceThemeOverlay</item> + </style> + + <style name="Theme.AntennaPod.Light" parent="Theme.AntennaPod.Dynamic.Light"> + <item name="isMaterial3DynamicColorApplied">false</item> + <item name="colorPrimary">@color/accent_light</item> + <item name="colorOnPrimary">@color/white</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:colorBackground">@color/background_light</item> + <item name="colorSurface">@color/background_light</item> + <item name="colorSurfaceVariant">#D3DCE0</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.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</item> + <item name="background_elevated">@color/background_elevated_darktheme</item> + <item name="action_icon_color">@color/white</item> + <item name="android:textAllCaps">false</item> + <item name="seek_background">@color/seek_background_dark</item> + <item name="dragview_background">@drawable/ic_drag_darktheme</item> + <item name="scrollbar_thumb">@drawable/scrollbar_thumb_dark</item> + <item name="icon_red">#CF1800</item> + <item name="icon_yellow">#F59F00</item> + <item name="icon_green">#008537</item> + <item name="icon_purple">#AA55D8</item> + <item name="icon_gray">#CDD9E4</item> + <item name="android:splitMotionEvents">false</item> + <item name="android:fitsSystemWindows">false</item> + <item name="android:statusBarColor">@android:color/transparent</item> + <item name="android:windowLightStatusBar" tools:targetApi="m">false</item> + <item name="android:windowContentTransitions">true</item> + <item name="android:navigationBarColor">@color/background_darktheme</item> + <item name="preferenceTheme">@style/AppPreferenceThemeOverlay</item> + </style> + + <style name="Theme.AntennaPod.Dark" parent="Theme.AntennaPod.Dynamic.Dark"> + <item name="isMaterial3DynamicColorApplied">false</item> + <item name="colorPrimary">@color/accent_dark</item> + <item name="colorOnPrimary">@color/black</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:colorBackground">@color/background_darktheme</item> + <item name="colorSurface">@color/background_darktheme</item> + <item name="colorSurfaceVariant">#2F3B4F</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:colorBackground">@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">@color/black</item> + </style> + + <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="colorSurface">@color/black</item> + <item name="background_color">@color/black</item> + <item name="background_elevated">@color/black</item> + <item name="android:navigationBarColor">@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> + <item name="windowActionModeOverlay">true</item> + </style> + + <style name="Theme.AntennaPod.TrueBlack.NoTitle" parent="Theme.AntennaPod.TrueBlack"> + <item name="windowActionBar">false</item> + <item name="windowNoTitle">true</item> + <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">@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">@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.Dynamic.Dark.Translucent" parent="Theme.AntennaPod.Dynamic.Dark.NoTitle"> + <item name="android:statusBarColor">@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">@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.Dynamic.TrueBlack.Translucent" parent="Theme.AntennaPod.Dynamic.TrueBlack.NoTitle"> + <item name="android:statusBarColor">@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">@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="AnimationFade"> + <item name="android:windowEnterAnimation">@android:anim/fade_in</item> + <item name="android:windowExitAnimation">@android:anim/fade_out</item> + </style> + + <style name="Theme.AntennaPod.Splash" parent="Theme.SplashScreen"> + <item name="android:navigationBarColor">@android:color/transparent</item> + <item name="android:statusBarColor">@android:color/transparent</item> + <item name="android:windowLightStatusBar" tools:targetApi="M">false</item> + <item name="android:fitsSystemWindows">true</item> + <item name="android:windowTranslucentStatus">false</item> + <item name="android:windowTranslucentNavigation">false</item> + <item name="android:windowDrawsSystemBarBackgrounds">true</item> + <item name="android:enforceNavigationBarContrast" tools:targetApi="q">false</item> + <item name="windowSplashScreenAnimatedIcon">@drawable/launcher_animate</item> + </style> + + <style name="Theme.AntennaPod.VideoPlayer" parent="@style/Theme.AntennaPod.Dark"> + <item name="windowActionBarOverlay">true</item> + </style> + + <style name="AntennaPod.TextView.Heading" parent="@android:style/TextAppearance.Medium"> + <item name="android:textSize">@dimen/text_size_large</item> + <item name="android:textColor">?android:attr/textColorPrimary</item> + <item name="android:fontFamily">sans-serif-light</item> + </style> + + <style name="AntennaPod.TextView.ListItemPrimaryTitle" parent="@style/TextAppearance.Material3.BodyLarge"> + <item name="android:textColor">?attr/colorOnSurface</item> + <item name="android:maxLines">2</item> + <item name="android:ellipsize">end</item> + <item name="lineHeight">20sp</item> + <item name="android:lineHeight" tools:targetApi="p">20sp</item> + </style> + + <style name="AntennaPod.TextView.ListItemSecondaryTitle" parent="@style/TextAppearance.Material3.BodyMedium"> + <item name="android:textColor">?attr/colorOnSurfaceVariant</item> + <item name="android:lines">1</item> + <item name="android:ellipsize">end</item> + </style> + + <style name="AntennaPod.TextView.ListItemBody" parent="@style/TextAppearance.Material3.BodyMedium"> + <item name="android:textColor">?attr/colorOnSurfaceVariant</item> + <item name="lineHeight">18sp</item> + <item name="android:lineHeight" tools:targetApi="p">18sp</item> + </style> + + <style name="OutlinedButtonBetterContrast" parent="Widget.Material3.Button.OutlinedButton"> + <item name="backgroundTint">@color/button_bg_selector</item> + </style> + + <style name="ProgressBarLight"> + <item name="android:indeterminateOnly">false</item> + <item name="android:progressDrawable">@drawable/progress_bar_horizontal_light</item> + </style> + + <style name="ProgressBarDark"> + <item name="android:indeterminateOnly">false</item> + <item name="android:progressDrawable">@drawable/progress_bar_horizontal_dark</item> + </style> + + <style name="FastScrollRecyclerView" parent="android:Widget"> + <item name="android:scrollbars">none</item> + <item name="fastScrollEnabled">true</item> + <item name="fastScrollHorizontalThumbDrawable">?attr/scrollbar_thumb</item> + <item name="fastScrollHorizontalTrackDrawable">@drawable/scrollbar_track</item> + <item name="fastScrollVerticalThumbDrawable">?attr/scrollbar_thumb</item> + <item name="fastScrollVerticalTrackDrawable">@drawable/scrollbar_track</item> + </style> + + <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"> + <item name="android:drawablePadding">8dp</item> + <item name="android:paddingTop">8dp</item> + <item name="android:paddingBottom">8dp</item> + <item name="android:background">?android:attr/selectableItemBackground</item> + <item name="android:textColor">?android:attr/textColorPrimary</item> + <item name="android:clickable">true</item> + </style> + + <style name="TextPill"> + <item name="android:background">@drawable/bg_pill_translucent</item> + <item name="android:layout_margin">8dp</item> + <item name="android:textColor">@color/white</item> + <item name="android:textAlignment">center</item> + <item name="android:paddingStart">8dp</item> + <item name="android:paddingEnd">8dp</item> + </style> + + <style name="AppPreferenceThemeOverlay" parent="@style/PreferenceThemeOverlay"> + <item name="switchPreferenceCompatStyle">@style/AppSwitchPreference</item> + </style> + + <style name="AppSwitchPreference" parent="@style/Preference.SwitchPreferenceCompat.Material"> + <item name="widgetLayout">@layout/preference_material_switch</item> + </style> + +</resources> |