Package-level declarations
Types
Properties
Link copied to clipboard
AmbientState represents the current state of an ambient effect. It defaults to AmbientState.Inactive if no state is provided.
Functions
Link copied to clipboard
fun AmbientAware(lifecycle: Lifecycle = LocalLifecycleOwner.current.lifecycle, content: @Composable (AmbientState) -> Unit)
Composable for general handling of changes and updates to ambient status. A new AmbientState is generated with any change of ambient state, as well as with any periodic update generated whilst the screen is in ambient mode.
Link copied to clipboard
fun AmbientAwareTime(stateUpdate: AmbientState, updatePeriodMillis: Long = 1000, block: @Composable (dateTime: ZonedDateTime, isAmbient: Boolean) -> Unit)
An example of using AmbientAware: Provides the time, at the specified update frequency, whilst in interactive mode, or when ambient-generated updates occur (typically every 1 min).