I'm using Jetpack compose with Scaffold. As you can see it doesn't work properly.
Scaffold(
modifier = Modifier
.fillMaxSize()
.navigationBarsPadding(),
) {
...
}
Note that I have called WindowCompat.setDecorFitsSystemWindows(window, false)
on host activity.
Also this result is happing on Lg G4 - Api 26
CodePudding user response:
You can try add this code, set in your root
ProvideWindowInsets {}
CodePudding user response:
WindowCompat.setDecorFitsSystemWindows(window, false)
:Indicates that the content can extend to the system bar
In your case, you can use:WindowCompat.setDecorFitsSystemWindows(window, true)
Example:
Scaffold(
modifier = Modifier
.fillMaxSize(),
) {
...
}