Sets the width to that of [insets] at the [start][androidx.
insetsStartWidthSample
fun insetsStartWidthSample() {
class SampleActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
Box(Modifier.fillMaxSize()) {
// Background for navigation bar at the start
Box(
Modifier.windowInsetsStartWidth(WindowInsets.navigationBars)
.fillMaxHeight()
.align(Alignment.CenterStart)
.background(Color.Red)
)
// app content
}
}
}
}
}