SystemUiController

@Stable()
interface SystemUiController

A class which provides easy-to-use utilities for updating the System UI bar colors within Jetpack Compose.

Samples

com.google.accompanist.sample.systemuicontroller.SystemUiControllerSample

Functions

setNavigationBarColor
Link copied to clipboard
abstract fun setNavigationBarColor(color: Color, darkIcons: Boolean = color.luminance() > 0.5f, navigationBarContrastEnforced: Boolean = true, transformColorForLightContent: (Color) -> Color = BlackScrimmed)
Set the navigation bar color.
setStatusBarColor
Link copied to clipboard
abstract fun setStatusBarColor(color: Color, darkIcons: Boolean = color.luminance() > 0.5f, transformColorForLightContent: (Color) -> Color = BlackScrimmed)
Set the status bar color.
setSystemBarsColor
Link copied to clipboard
open fun setSystemBarsColor(color: Color, darkIcons: Boolean = color.luminance() > 0.5f, isNavigationBarContrastEnforced: Boolean = true, transformColorForLightContent: (Color) -> Color = BlackScrimmed)
Set the status and navigation bars to color.

Properties

isNavigationBarContrastEnforced
Link copied to clipboard
abstract var isNavigationBarContrastEnforced: Boolean
Property which holds whether the system is ensuring that the navigation bar has enough contrast when a fully transparent background is requested.
isNavigationBarVisible
Link copied to clipboard
abstract var isNavigationBarVisible: Boolean
Property which holds the navigation bar visibility.
isStatusBarVisible
Link copied to clipboard
abstract var isStatusBarVisible: Boolean
Property which holds the status bar visibility.
isSystemBarsVisible
Link copied to clipboard
open var isSystemBarsVisible: Boolean
Property which holds the status & navigation bar visibility.
navigationBarDarkContentEnabled
Link copied to clipboard
abstract var navigationBarDarkContentEnabled: Boolean
Property which holds whether the navigation bar icons + content are 'dark' or not.
statusBarDarkContentEnabled
Link copied to clipboard
abstract var statusBarDarkContentEnabled: Boolean
Property which holds whether the status bar icons + content are 'dark' or not.
systemBarsDarkContentEnabled
Link copied to clipboard
open var systemBarsDarkContentEnabled: Boolean
Property which holds whether the status & navigation bar icons + content are 'dark' or not.