Fix status bar color when applying Material You.

This commit is contained in:
Alex Ning 2021-07-17 09:13:09 +08:00
parent 840383b30f
commit e10fc4c96e

View File

@ -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;