A CommonStyleScope is the scope used by a CommonStyle. It provides the common implementation that all styles scopes share. Is created by a StyleResolver when resolving styles and is used to collect the properties set by a style.

Summary

Inherited functions

From androidx.compose.foundation.style.AnimateStyleScope
Unit
animate(
    toSpec: AnimationSpec<Float>,
    fromSpec: AnimationSpec<Float>,
    block: () -> Unit
)

Specifies a Style whose properties will be animated to when they change, using the provided AnimationSpec.

Cmn
From androidx.compose.ui.unit.Density
open Int

Convert Dp to Int by rounding

Cmn
open Int

Convert Sp to Int by rounding

Cmn
open Dp

Convert an Int pixel value to Dp.

Cmn
open Dp

Convert a Float pixel value to a Dp

Cmn
open DpSize

Convert a Size to a DpSize.

Cmn
open Float

Convert Dp to pixels.

Cmn
open Float

Convert Sp to pixels.

Cmn
open Rect

Convert a DpRect to a Rect.

Cmn
open Size

Convert a DpSize to a Size.

Cmn
open TextUnit

Convert an Int pixel value to Sp.

Cmn
open TextUnit

Convert a Float pixel value to a Sp

Cmn
From androidx.compose.ui.unit.FontScaling
Dp

Convert Sp to Dp.

Cmn
TextUnit

Convert Dp to Sp.

Cmn
From androidx.compose.foundation.style.NestedStyleConsumerStyleScope
Unit

Applies a style with the given key defined in a parent style.

Cmn
From androidx.compose.foundation.style.NestedStyleProviderStyleScope
Unit

Provides style as a nested style to the nested composable identified by the provided key.

Cmn
From androidx.compose.foundation.style.StylePropertyProviderScope
Unit
<T : Any?> ProvidableStyleProperty<T>.provide(value: T)

Sets or updates the value of a ProvidableStyleProperty.

Cmn
From androidx.compose.foundation.style.StyleStateScope
Unit
<T : Any?> state(
    key: StyleStateKey<T>,
    block: () -> Unit,
    active: (key: StyleStateKey<T>, state: StyleState) -> Boolean
)

A helper function to implement state reading extension functions such as StyleScope.pressed.

Cmn

Inherited properties

From androidx.compose.runtime.CompositionLocalAccessorScope
T

An extension property that allows accessing the current value of a composition local in the context of this scope.

Cmn
From androidx.compose.ui.unit.Density
Float

The logical density of the display.

Cmn
From androidx.compose.ui.unit.FontScaling
Float

Current user preference for the scaling factor for fonts.

Cmn
From androidx.compose.foundation.style.StyleStateScope
StyleState

The state of the component. applying this style.

Cmn