diff options
author | ByteHamster <info@bytehamster.com> | 2019-11-05 15:28:29 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-11-05 15:28:32 +0100 |
commit | 8aff9709c379664625eb5c0b4e672115fb9385d4 (patch) | |
tree | 010f03db6a312115124660d936a038d6f738d6e4 /core | |
parent | 363c3614f8ff80a1c48d0a59735656dde76b2da9 (diff) | |
download | AntennaPod-8aff9709c379664625eb5c0b4e672115fb9385d4.zip |
Style OnlineFeedViewActivity like a dialog
User study showed that new users do not get the difference between the actual
feed list and the preview. If the preview is a dialog, this is a lot easier to see.
Additionally, the "dialog" now closes after the subscription succeeded.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java | 11 | ||||
-rw-r--r-- | core/src/main/res/values/styles.xml | 39 |
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 be130c00f..86cae3247 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 @@ -182,6 +182,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> |