S.
05/01/2025, 9:51 AMSystemUiController
and promotes enableEdgeToEdge()
, how do I set the color for the Statusbar icons? enableEdgeToEdge
only seems to change the background colorFrank Bouwens
05/01/2025, 12:01 PMwindow.statusBarColor = android.graphics.Color.BLACK
WindowCompat.getInsetsController(window, window.decorView).isAppearanceLightStatusBars = true
Louis Pullen-Freilich [G]
05/01/2025, 12:33 PMS.
05/01/2025, 1:09 PMenableEdgeToEdge(
SystemBarStyle.auto(scrimLight.toArgb(), scrimDark.toArgb()),
SystemBarStyle.auto(scrimLight.toArgb(), scrimDark.toArgb())
)
S.
05/01/2025, 1:12 PMLouis Pullen-Freilich [G]
05/01/2025, 1:27 PMauto
that will use the system setting for dark theme to determine light / dark icons. If for example you are always using a dark theme, you should use SystemBarStyle.dark(Color.TRANSPARENT)
or similar insteadLouis Pullen-Freilich [G]
05/01/2025, 1:28 PMS.
05/01/2025, 1:28 PMauto
settings I showed aboveLouis Pullen-Freilich [G]
05/01/2025, 1:29 PMS.
05/01/2025, 1:30 PMLouis Pullen-Freilich [G]
05/01/2025, 1:31 PMauto
,
detectDarkMode: (Resources) -> Boolean = { resources ->
(resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) ==
Configuration.UI_MODE_NIGHT_YES
}
And pass a lambda here that queries your user controlled setting tooLouis Pullen-Freilich [G]
05/01/2025, 1:31 PMS.
05/01/2025, 1:33 PMLouis Pullen-Freilich [G]
05/01/2025, 1:53 PM