Skip to content

Instantly share code, notes, and snippets.

@KatieBarnett
Created December 21, 2023 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KatieBarnett/a9dc0e9caa6dcb96acad2c1796939a68 to your computer and use it in GitHub Desktop.
Save KatieBarnett/a9dc0e9caa6dcb96acad2c1796939a68 to your computer and use it in GitHub Desktop.
Edge to Edge theme removal
@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