summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorH. Lehmann <ByteHamster@users.noreply.github.com>2019-11-05 23:30:42 +0100
committerGitHub <noreply@github.com>2019-11-05 23:30:42 +0100
commite7b0fb729b02dc40de679ec3387beb1e1d2584b9 (patch)
treea31c6ea448bcbc20dbfab50f4e9a606f6010f368 /core/src
parent808f273c09c9aebabf7cf616318a37fb37acca42 (diff)
parent8aff9709c379664625eb5c0b4e672115fb9385d4 (diff)
downloadAntennaPod-e7b0fb729b02dc40de679ec3387beb1e1d2584b9.zip
Merge pull request #3581 from ByteHamster/feedview-dialog
Style OnlineFeedViewActivity like a dialog
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java11
-rw-r--r--core/src/main/res/values/styles.xml39
2 files changed, 49 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java
index ff2a2e1ca..a3d3b56e0 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java
@@ -183,6 +183,17 @@ public class UserPreferences {
}
}
+ public static int getTranslucentTheme() {
+ int theme = getTheme();
+ if (theme == R.style.Theme_AntennaPod_Dark) {
+ return R.style.Theme_AntennaPod_Dark_Translucent;
+ } else if (theme == R.style.Theme_AntennaPod_TrueBlack) {
+ return R.style.Theme_AntennaPod_TrueBlack_Translucent;
+ } else {
+ return R.style.Theme_AntennaPod_Light_Translucent;
+ }
+ }
+
public static List<String> getHiddenDrawerItems() {
String hiddenItems = prefs.getString(PREF_HIDDEN_DRAWER_ITEMS, "");
return new ArrayList<>(Arrays.asList(TextUtils.split(hiddenItems, ",")));
diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml
index d2ba4bb50..e3f351d05 100644
--- a/core/src/main/res/values/styles.xml
+++ b/core/src/main/res/values/styles.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
+<resources xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.AntennaPod.Light" parent="Theme.Base.AntennaPod.Light">
<!-- Room for API dependent attributes -->
@@ -224,6 +224,43 @@
<item name="windowActionModeOverlay">true</item>
</style>
+ <style name="Theme.AntennaPod.Light.Translucent" parent="Theme.AntennaPod.Light.NoTitle">
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:background">@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:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
+ <item name="android:fitsSystemWindows">true</item>
+ </style>
+
+ <style name="Theme.AntennaPod.Dark.Translucent" parent="Theme.AntennaPod.Dark.NoTitle">
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:background">@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:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
+ <item name="android:fitsSystemWindows">true</item>
+ </style>
+
+ <style name="Theme.AntennaPod.TrueBlack.Translucent" parent="Theme.Base.AntennaPod.TrueBlack">
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:background">@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:windowTranslucentStatus" tools:targetApi="kitkat">true</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.Dark.Splash" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/bg_splash</item>