-
-
Save KatieBarnett/a9dc0e9caa6dcb96acad2c1796939a68 to your computer and use it in GitHub Desktop.
Edge to Edge theme removal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun Theme( | |
darkTheme: Boolean = isSystemInDarkTheme(), | |
dynamicColor: Boolean = true, | |
content: @Composable () -> Unit | |
) { | |
... | |
// Remove this: | |
val view = LocalView.current | |
if (!view.isInEditMode) { | |
SideEffect { | |
(view.context as Activity).window.statusBarColor = colorScheme.primary.toArgb() | |
ViewCompat.getWindowInsetsController(view)?.isAppearanceLightStatusBars = darkTheme | |
} | |
} | |
// end removal | |
... | |
MaterialTheme( | |
colorScheme = colorScheme, | |
typography = Typography, | |
content = content | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment