Function

Navigation

A DeviceConfigurationOverride that overrides the current navigation type and whether it is hidden.

DeviceConfigurationOverrideNavigation

@Sampled
@Composable
fun DeviceConfigurationOverrideNavigation() {
    DeviceConfigurationOverride(
        DeviceConfigurationOverride.Navigation(
            navigationType = Configuration.NAVIGATION_DPAD,
            isHidden = false,
        )
    ) {
        LocalConfiguration.current.navigation // will be Configuration.NAVIGATION_DPAD
        LocalConfiguration.current.navigationHidden // will be Configuration.NAVIGATIONHIDDEN_NO
    }
}
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: