Composable Function

DisableSelection

Disables text selection for its direct or indirect children.

DisableSelectionSample

@Sampled
@Composable
fun DisableSelectionSample() {
    SelectionContainer {
        Column {
            Text("Text 1")

            DisableSelection {
                Text("Text 2")
                Text("טקסט 3")
            }

            Text("Text 3")
        }
    }
}
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: