aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-07-17 01:13:09 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-07-17 01:13:09 +0000
commite10fc4c96ea9344fbcce80e47c3cffbd0ac437a3 (patch)
tree8f25b982ca53d6f9eadcc4dcb5c3ac6473317606 /app/src/main/java/ml
parent840383b30ff7e8a0573af696bcf5b1ac5052d4b7 (diff)
downloadinfinity-for-reddit-e10fc4c96ea9344fbcce80e47c3cffbd0ac437a3.tar
infinity-for-reddit-e10fc4c96ea9344fbcce80e47c3cffbd0ac437a3.tar.gz
infinity-for-reddit-e10fc4c96ea9344fbcce80e47c3cffbd0ac437a3.tar.bz2
infinity-for-reddit-e10fc4c96ea9344fbcce80e47c3cffbd0ac437a3.tar.lz
infinity-for-reddit-e10fc4c96ea9344fbcce80e47c3cffbd0ac437a3.tar.xz
infinity-for-reddit-e10fc4c96ea9344fbcce80e47c3cffbd0ac437a3.tar.zst
infinity-for-reddit-e10fc4c96ea9344fbcce80e47c3cffbd0ac437a3.zip
Fix status bar color when applying Material You.
Diffstat (limited to 'app/src/main/java/ml')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/utils/MaterialYouUtils.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/MaterialYouUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/MaterialYouUtils.java
index 37e92aa1..6c93b42b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/MaterialYouUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/MaterialYouUtils.java
@@ -88,7 +88,10 @@ public class MaterialYouUtils {
lightTheme.tabLayoutWithExpandedCollapsingToolbarTabIndicator = colorPrimaryAppropriateTextColor;
lightTheme.tabLayoutWithExpandedCollapsingToolbarTextColor = colorPrimaryAppropriateTextColor;
lightTheme.circularProgressBarBackground = colorPrimaryInt;
- lightTheme.isLightStatusBar = getAppropriateTextColor(colorPrimaryInt) == Color.toArgb(Color.BLACK);
+ lightTheme.isLightStatusBar = colorPrimaryAppropriateTextColor == Color.BLACK;
+ lightTheme.isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface =
+ (lightTheme.isLightStatusBar && getAppropriateTextColor(cardViewBackgroundColor) == Color.WHITE)
+ || (!lightTheme.isLightStatusBar && getAppropriateTextColor(cardViewBackgroundColor) == Color.BLACK);
lightTheme.name = "Material You";
darkTheme.colorAccent = colorPrimaryInt;