I am using the latest BOM
version of jetpack compose: implementation platform('androidx.compose:compose-bom:2023.06.01')
align with materail3
. I need my content to ignore safe area. I have already tried the solution of using accompanist library for this
In MainActivity.kt
I added
WindowCompat.setDecorFitsSystemWindows(window, false)
Inside my composable
I added
val systemUiController = rememberSystemUiController()
val useDarkIcons = !isSystemInDarkTheme()
DisposableEffect(systemUiController, useDarkIcons) {
// Update all of the system bar colors to be transparent, and use
// dark icons if we're in light theme
systemUiController.setSystemBarsColor(
color = Color.Transparent,
darkIcons = useDarkIcons
)
// setStatusBarColor() and setNavigationBarColor() also exist
onDispose {}
}
I also tried adding
Scaffold(
content = {
Box(
modifier = Modifier.padding(it.calculateTopPadding())
) {....
But still my content does not ignore safe area. In short I just need to hide the default status bar so my image can occupy entire height