Closed FunkyMuse closed 11 months ago
Could you provide more info about your app theme in the reproducing section?
As is, the Box
with the color won't be visible as it isn't taking up any size.
Could you provide more info about your app theme in the reproducing section?
As is, the
Box
with the color won't be visible as it isn't taking up any size.
Even if you add fillMaxSize it has the same problem.
https://github.com/SimpleMobileTools/Simple-Commons/pull/1777
You can check here https://github.com/FunkyMuse/Simple-Commons/tree/master opening up on the second button (bottom sheet chooser) it will launch https://github.com/FunkyMuse/Simple-Commons/blob/master/commons/src/main/kotlin/com/simplemobiletools/commons/compose/screens/AboutScreen.kt
When it comes to using a scaffold i've managed to fix it by just doing
Box(
modifier = modifier
.fillMaxSize()
.padding(top = paddingValues.calculateTopPadding()) //crucial part
.background(MaterialTheme.colorScheme.surface)
) {
content()
}
But if it's not a scaffold like in the example let's say, i've no idea
Once the navigation bar is transparent, the effective color in the area of the navigation bar is controlled by whatever content is behind it.
If you're applying a background color after applying padding, then that color won't be visible in the space where the padding was applied, and instead the overall background color will be used.
I'd recommend debugging the layout inspector, and see if the bounds of the components are what you expect. It sounds like the navigation bar color is correctly being set to transparent by the systemuicontroller.
Description Using accompanist
0.33.0-alpha
makes the navigation bar color not transparent, rather white/dark depending on the themeSteps to reproduce
Expected behavior The navigation bar color should be transparent
Additional context![Screenshot_20230814_162402](https://github.com/google/accompanist/assets/25645122/f3f75ca9-b563-4140-b67a-b00e8f51b4e7)