Thread
#compose
    Irving

    Irving

    1 year ago
    Hello, I read the source code of
    CircularProgressIndicator
    to learn how to write a custom view.But I'm confused about the
    Modifier.semantics
    . I thought it's
    SemanticsModifierCore
    may store the properties of CircularProgressIndicator,but i did't see anything about
    SemanticsModifierCore
    in
    CircularProgressIndicator
    .So what does
    Modifier.semantics
    do for us?😢
    fun Modifier.semantics(
        mergeAllDescendants: Boolean = false, 
        properties: SemanticsPropertyReceiver.() -> Unit
    ): Modifier = composed {
     val id = remember { SemanticsModifierCore.generateSemanticsId() }
    SemanticsModifierCore(id, mergeAllDescendants, properties)
    }
    Adam Powell

    Adam Powell

    1 year ago
    Semantics publishes metadata about the UI to accessibility services and similar
    a

    allan.conda

    1 year ago
    and similar
    including testing
    Irving

    Irving

    1 year ago
    Wa!Thanks,I didn't know about accessibility services before.Now i think i've got it!