ARTICLE AD BOX
So I've been playing around a little with edge to edge, and according to the official Android documentation they show that you can force the status bar icons to show up as dark by using...
WindowCompat.getInsetsController(window, window.decorView) .isAppearanceLightStatusBars = trueSo I gave that a shot in my app and the status bar icons are still showing as light, which is making the icons sort of invisible in my app, since I am using the surface color with a scaffold. I do want the app color to extend behind the status bar, but the icons need to be black, or at least the dark color.
A very simple example of what I mean is...
class MainActivity: FragmentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) enableEdgeToEdge() WindowCompat.getInsetsController(window, window.decorView) .isAppearanceLightStatusBars = true setContent { StatusBarTestTheme { Surface(color = MaterialTheme.colorScheme.surface) { Scaffold(...) { padding -> HomeView(padding) } } } } } @Composable fun HomeView(padding: PaddingValues) { Box(modifier = Modifier.padding(padding) { Column( modifier = Modifier.fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center ) { Text("Hello There") } } } When you do that, if the device theme is in light mode the status bar icons are white, it doesn't seem to take the `isAppearanceLightStatusBars = true` into effect at all. If I switch the device to dark mode, then the icons are black, but I need them to always be black.The documentation I'm looking at is on the official android developer page here...
https://developer.android.com/develop/ui/compose/system/setup-e2e
