RemoteTitleCard

Functions summary

Unit
@RemoteComposable
@Composable
RemoteTitleCard(
    onClick: Action,
    title: @Composable @RemoteComposable () -> Unit,
    modifier: RemoteModifier,
    enabled: RemoteBoolean,
    time: (@Composable @RemoteComposable () -> Unit)?,
    subtitle: (@Composable @RemoteComposable () -> Unit)?,
    shape: RemoteShape,
    colors: RemoteCardColors,
    contentPadding: RemotePaddingValues,
    content: (@Composable @RemoteComposable () -> Unit)?
)

Opinionated Wear Material 3 RemoteCard that offers a specific layout to show interactive information about an application, e.g. a message.

Functions

@RemoteComposable
@Composable
fun RemoteTitleCard(
    onClick: Action,
    title: @Composable @RemoteComposable () -> Unit,
    modifier: RemoteModifier = RemoteModifier,
    enabled: RemoteBoolean = true.rb,
    time: (@Composable @RemoteComposable () -> Unit)? = null,
    subtitle: (@Composable @RemoteComposable () -> Unit)? = null,
    shape: RemoteShape = RemoteCardDefaults.shape,
    colors: RemoteCardColors = RemoteCardDefaults.cardColors(),
    contentPadding: RemotePaddingValues = RemoteCardDefaults.ContentPadding,
    content: (@Composable @RemoteComposable () -> Unit)? = null
): Unit

Opinionated Wear Material 3 RemoteCard that offers a specific layout to show interactive information about an application, e.g. a message.

import androidx.compose.remote.creation.compose.action.Action
import androidx.compose.remote.creation.compose.state.rs
import androidx.wear.compose.remote.material3.RemoteText
import androidx.wear.compose.remote.material3.RemoteTitleCard

RemoteTitleCard(
    onClick = Action.Empty,
    title = { RemoteText("Title Card Title".rs) },
    time = { RemoteText("now".rs) },
    subtitle = { RemoteText("Card Subtitle here".rs) },
) {
    RemoteText("This is a sample Title Card.".rs)
}
Parameters
onClick: Action

Will be called when the user clicks the card

title: @Composable @RemoteComposable () -> Unit

A slot for displaying the title of the card

modifier: RemoteModifier = RemoteModifier

Modifier to be applied to the card

enabled: RemoteBoolean = true.rb

Controls the enabled state of the card. When false, this component will not respond to user input

time: (@Composable @RemoteComposable () -> Unit)? = null

An optional slot for displaying the time relevant to the contents of the card

subtitle: (@Composable @RemoteComposable () -> Unit)? = null

An optional slot for displaying the subtitle of the card

shape: RemoteShape = RemoteCardDefaults.shape

Defines the card's shape.

colors: RemoteCardColors = RemoteCardDefaults.cardColors()

RemoteCardColors that will be used to resolve the colors used for this card.

contentPadding: RemotePaddingValues = RemoteCardDefaults.ContentPadding

The spacing values to apply internally between the container and the content

content: (@Composable @RemoteComposable () -> Unit)? = null

The optional body content of the card.