Composable Function

RemoteStateLayout

A layout that manages and displays multiple states defined by a RemoteEnum.

RemoteStateLayout

Source set: JvmAndAndroid
@Composable
public fun <T : Enum<T>> RemoteStateLayout(
    currentState: RemoteEnum<T>,
    modifier: RemoteModifier = RemoteModifier,
    content: @RemoteComposable @Composable (T) -> Unit,
)

A layout that manages and displays multiple states defined by a RemoteEnum.

This component ensures that all possible states defined in the RemoteEnum are composed, while the underlying remote rendering system handles the visibility and transitions between them based on the currentState.

Interactive example cycling through enum states in a RemoteStateLayout:

Parameters

currentState The RemoteEnum governing the available states and the current active state.
modifier The RemoteModifier to be applied to this layout.
content A composable lambda that defines the UI for each state T.

RemoteStateLayout

Source set: JvmAndAndroid
@Composable
public fun RemoteStateLayout(
    currentState: RemoteBoolean,
    modifier: RemoteModifier = RemoteModifier,
    content: @RemoteComposable @Composable (Boolean) -> Unit,
)

A layout that manages and displays two states defined by a RemoteBoolean.

This component ensures that both possible states are composed, while the underlying remote rendering system handles the visibility and transitions between them based on the currentState.

Interactive example toggling between boolean states in a RemoteStateLayout:

Parameters

currentState The RemoteBoolean governing the current active state.
modifier The RemoteModifier to be applied to this layout.
content A composable lambda that defines the UI for each state Boolean.

RemoteStateLayout

Source set: JvmAndAndroid
@Composable
public fun RemoteStateLayout(
    currentState: RemoteInt,
    vararg states: Int,
    modifier: RemoteModifier = RemoteModifier,
    content: @RemoteComposable @Composable (Int) -> Unit,
)

A layout that manages and displays multiple states defined by a RemoteInt.

This component ensures that all possible states defined in states are composed, while the underlying remote rendering system handles the visibility and transitions between them based on the currentState.

Interactive example cycling through integer states in a RemoteStateLayout:

Parameters

currentState The RemoteInt governing the current active state.
states The list of integer states that this layout can display.
modifier The RemoteModifier to be applied to this layout.
content A composable lambda that defines the UI for each state Int.
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: