Function

Touchscreen

A DeviceConfigurationOverride that overrides the current touchscreen type.

DeviceConfigurationOverrideTouchscreen

@Sampled
@Composable
fun DeviceConfigurationOverrideTouchscreen() {
    DeviceConfigurationOverride(DeviceConfigurationOverride.Touchscreen(false)) {
        LocalConfiguration.current.touchscreen // will be Configuration.TOUCHSCREEN_NOTOUCH
    }
}
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: