Interface

StyleLayerScope

Introduces the CustomStyleScope styleLayer method that allows styles to create a style property layer.

Source set: Common
public interface StyleLayerScope

Introduces the CustomStyleScope styleLayer method that allows styles to create a style property layer.

This is a separate interface to allow a CustomStyle type to decide if styleLayer is available directly in a style.

Functions

styleLayer

Source set: Common
public fun styleLayer(block: () -> Unit)

Raise the layer of properties that are set in block. Properties set in a layer will take precedence over properties set in the layers below it. A layer is implied by StyleStateScope.state, or helpers that use it, such as StyleStateScope.pressed and StyleStateScope.focused.

The last property set with the greatest style layer is the resolved value of a style property.

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: