RemoteAppCard

Functions summary

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

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

Functions

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

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

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

RemoteAppCard(
    onClick = Action.Empty,
    appName = { RemoteText("App Name".rs) },
    time = { RemoteText("now".rs) },
    title = { RemoteText("App Card Title".rs) },
) {
    RemoteText("This is a sample App Card.".rs)
}
Parameters
onClick: Action

Will be called when the user clicks the card.

appName: @Composable @RemoteComposable () -> Unit

A slot for displaying the application name.

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.

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

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

A slot for a small (RemoteCardDefaults.AppImageSize) image associated with the app.

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

A slot for displaying the time relevant to the contents of the card.

content: @Composable @RemoteComposable () -> Unit

The main slot for a content of this card