-
@Stable() public interface SystemUiControllerA class which provides easy-to-use utilities for updating the System UI bar colors within Jetpack Compose.
-
-
Method Summary
Modifier and Type Method Description abstract UnitsetStatusBarColor(Color color, Boolean darkIcons, Function1<Color, Color> transformColorForLightContent)Set the status bar color. abstract UnitsetNavigationBarColor(Color color, Boolean darkIcons, Boolean navigationBarContrastEnforced, Function1<Color, Color> transformColorForLightContent)Set the navigation bar color. UnitsetSystemBarsColor(Color color, Boolean darkIcons, Boolean isNavigationBarContrastEnforced, Function1<Color, Color> transformColorForLightContent)Set the status and navigation bars to color. abstract IntegergetSystemBarsBehavior()Control for the behavior of the system bars. abstract UnitsetSystemBarsBehavior(Integer systemBarsBehavior)Control for the behavior of the system bars. abstract BooleangetIsStatusBarVisible()Property which holds the status bar visibility. abstract UnitsetIsStatusBarVisible(Boolean isStatusBarVisible)Property which holds the status bar visibility. abstract BooleangetIsNavigationBarVisible()Property which holds the navigation bar visibility. abstract UnitsetIsNavigationBarVisible(Boolean isNavigationBarVisible)Property which holds the navigation bar visibility. BooleangetIsSystemBarsVisible()UnitsetIsSystemBarsVisible(Boolean isSystemBarsVisible)abstract BooleangetStatusBarDarkContentEnabled()Property which holds whether the status bar icons + content are 'dark' or not. abstract UnitsetStatusBarDarkContentEnabled(Boolean statusBarDarkContentEnabled)Property which holds whether the status bar icons + content are 'dark' or not. abstract BooleangetNavigationBarDarkContentEnabled()Property which holds whether the navigation bar icons + content are 'dark' or not. abstract UnitsetNavigationBarDarkContentEnabled(Boolean navigationBarDarkContentEnabled)Property which holds whether the navigation bar icons + content are 'dark' or not. BooleangetSystemBarsDarkContentEnabled()UnitsetSystemBarsDarkContentEnabled(Boolean systemBarsDarkContentEnabled)abstract BooleangetIsNavigationBarContrastEnforced()Property which holds whether the system is ensuring that the navigation bar has enough contrast when a fully transparent background is requested. abstract UnitsetIsNavigationBarContrastEnforced(Boolean isNavigationBarContrastEnforced)Property which holds whether the system is ensuring that the navigation bar has enough contrast when a fully transparent background is requested. -
-
Method Detail
-
setStatusBarColor
abstract Unit setStatusBarColor(Color color, Boolean darkIcons, Function1<Color, Color> transformColorForLightContent)
Set the status bar color.
- Parameters:
color- The desiredColor to set.darkIcons- Whether dark status bar icons would be preferable.transformColorForLightContent- A lambda which will be invoked to transform color if dark icons were requested but are not available.
-
setNavigationBarColor
abstract Unit setNavigationBarColor(Color color, Boolean darkIcons, Boolean navigationBarContrastEnforced, Function1<Color, Color> transformColorForLightContent)
Set the navigation bar color.
- Parameters:
color- The desiredColor to set.darkIcons- Whether dark navigation bar icons would be preferable.navigationBarContrastEnforced- Whether the system should ensure that the navigation bar has enough contrast when a fully transparent background is requested.transformColorForLightContent- A lambda which will be invoked to transform color if dark icons were requested but are not available.
-
setSystemBarsColor
Unit setSystemBarsColor(Color color, Boolean darkIcons, Boolean isNavigationBarContrastEnforced, Function1<Color, Color> transformColorForLightContent)
Set the status and navigation bars to color.
-
getSystemBarsBehavior
abstract Integer getSystemBarsBehavior()
Control for the behavior of the system bars. This value should be one of the WindowInsetsControllerCompat behavior constants: WindowInsetsControllerCompat.BEHAVIOR_SHOW_BARS_BY_TOUCH (Deprecated), WindowInsetsControllerCompat.BEHAVIOR_DEFAULT and WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE.
-
setSystemBarsBehavior
abstract Unit setSystemBarsBehavior(Integer systemBarsBehavior)
Control for the behavior of the system bars. This value should be one of the WindowInsetsControllerCompat behavior constants: WindowInsetsControllerCompat.BEHAVIOR_SHOW_BARS_BY_TOUCH (Deprecated), WindowInsetsControllerCompat.BEHAVIOR_DEFAULT and WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE.
-
getIsStatusBarVisible
abstract Boolean getIsStatusBarVisible()
Property which holds the status bar visibility. If set to true, show the status bar, otherwise hide the status bar.
-
setIsStatusBarVisible
abstract Unit setIsStatusBarVisible(Boolean isStatusBarVisible)
Property which holds the status bar visibility. If set to true, show the status bar, otherwise hide the status bar.
-
getIsNavigationBarVisible
abstract Boolean getIsNavigationBarVisible()
Property which holds the navigation bar visibility. If set to true, show the navigation bar, otherwise hide the navigation bar.
-
setIsNavigationBarVisible
abstract Unit setIsNavigationBarVisible(Boolean isNavigationBarVisible)
Property which holds the navigation bar visibility. If set to true, show the navigation bar, otherwise hide the navigation bar.
-
getIsSystemBarsVisible
Boolean getIsSystemBarsVisible()
-
setIsSystemBarsVisible
Unit setIsSystemBarsVisible(Boolean isSystemBarsVisible)
-
getStatusBarDarkContentEnabled
abstract Boolean getStatusBarDarkContentEnabled()
Property which holds whether the status bar icons + content are 'dark' or not.
-
setStatusBarDarkContentEnabled
abstract Unit setStatusBarDarkContentEnabled(Boolean statusBarDarkContentEnabled)
Property which holds whether the status bar icons + content are 'dark' or not.
-
getNavigationBarDarkContentEnabled
abstract Boolean getNavigationBarDarkContentEnabled()
Property which holds whether the navigation bar icons + content are 'dark' or not.
-
setNavigationBarDarkContentEnabled
abstract Unit setNavigationBarDarkContentEnabled(Boolean navigationBarDarkContentEnabled)
Property which holds whether the navigation bar icons + content are 'dark' or not.
-
getSystemBarsDarkContentEnabled
Boolean getSystemBarsDarkContentEnabled()
-
setSystemBarsDarkContentEnabled
Unit setSystemBarsDarkContentEnabled(Boolean systemBarsDarkContentEnabled)
-
getIsNavigationBarContrastEnforced
abstract Boolean getIsNavigationBarContrastEnforced()
Property which holds whether the system is ensuring that the navigation bar has enough contrast when a fully transparent background is requested. Only has an affect when running on Android API 29+ devices.
-
setIsNavigationBarContrastEnforced
abstract Unit setIsNavigationBarContrastEnforced(Boolean isNavigationBarContrastEnforced)
Property which holds whether the system is ensuring that the navigation bar has enough contrast when a fully transparent background is requested. Only has an affect when running on Android API 29+ devices.
-
-
-
-