Function

clearAndSetSemantics

Allow specifying semantic properties on a curved component, and clearing the existing properties.

CurvedClearSemanticsSample

@Sampled
@Composable
fun CurvedClearSemanticsSample() {
    val style =
        CurvedTextStyle(
            letterSpacing = 0.6.sp,
            letterSpacingCounterClockwise = 1.4.sp,
            color = Color.White,
        )
    Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
        CurvedLayout(modifier = Modifier.fillMaxSize()) {
            basicCurvedText("This is not announced", style, CurvedModifier.clearAndSetSemantics {})
        }
        Row { Text("This is announced", Modifier.semantics { traversalIndex = -1f }) }
    }
}
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: