Compose Modifier

zIndex

Creates a modifier that controls the drawing order for the children of the same layout parent.

ZIndexModifierSample

@Sampled
@Composable
fun ZIndexModifierSample() {
    Box {
        Text("Drawn second", Modifier.zIndex(1f))
        Text("Drawn first")
    }
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: