Adds padding to accommodate the [system gestures][WindowInsets.
systemGesturesPaddingSample
fun systemGesturesPaddingSample() {
class SampleActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
Box(Modifier.background(Color.Blue).systemBarsPadding()) {
// The app content won't interfere with the system gestures area.
// It will just be white.
Box(Modifier.background(Color.White).systemGesturesPadding()) {
// app content
}
}
}
}
}
}