RemoteTitleCard
@Composable
public fun RemoteTitleCard(
onClick: RemoteAction,
title: @Composable @RemoteComposable () -> Unit,
modifier: RemoteModifier = RemoteModifier,
time: (@Composable @RemoteComposable () -> Unit)? = null,
subtitle: (@Composable @RemoteComposable () -> Unit)? = null,
enabled: RemoteBoolean = true.rb,
shape: RemoteShape = RemoteCardDefaults.shape,
colors: RemoteCardColors = RemoteCardDefaults.cardColors(),
border: RemoteBorderStroke? = null,
contentPadding: RemotePaddingValues = RemoteCardDefaults.ContentPadding,
content: (@Composable @RemoteComposable () -> Unit)? = null,
)
Opinionated Wear Material 3 RemoteCard that offers a specific layout to show interactive information about an application, e.g. a message.
Example of a RemoteTitleCard with a title, timestamp, and body content:
Parameters
| onClick | Will be called when the user clicks the card |
| title | A slot for displaying the title of the card |
| modifier | Modifier to be applied to the card |
| time | An optional slot for displaying the time relevant to the contents of the card, or null to omit the time. |
| subtitle | An optional slot for displaying the subtitle of the card, or null to omit the subtitle. |
| enabled | Controls the enabled state of the card. When false, this component will not respond to user input |
| shape | Defines the card's shape. |
| colors | RemoteCardColors that will be used to resolve the colors used for this card. |
| border | A RemoteBorderStroke used for drawing the card's outline border, or null for no border. |
| contentPadding | The spacing values to apply internally between the container and the content |
| content | The optional body content of the card, or null to omit body content. |
RemoteTitleCard
@Composable
public fun RemoteTitleCard(
onClick: RemoteAction,
containerPainter: RemotePainter,
title: @Composable @RemoteComposable () -> Unit,
modifier: RemoteModifier = RemoteModifier,
time: (@Composable @RemoteComposable () -> Unit)? = null,
subtitle: (@Composable @RemoteComposable () -> Unit)? = null,
enabled: RemoteBoolean = true.rb,
shape: RemoteShape = RemoteCardDefaults.shape,
colors: RemoteCardColors = RemoteCardDefaults.cardWithContainerPainterColors(),
border: RemoteBorderStroke? = null,
contentPadding: RemotePaddingValues = RemoteCardDefaults.CardWithContainerPainterContentPadding,
content: (@Composable @RemoteComposable () -> Unit)? = null,
)
Opinionated Wear Material 3 RemoteCard that offers a specific layout to show interactive information about an application, e.g. a message, with a background image.
An Image background is a means to reinforce the meaning of information in a Card, e.g. to help to contextualize the information. Cards should have a content color that contrasts with the background image and scrim. This RemoteTitleCard takes containerPainter for the container image background to be drawn (the RemoteCardColors containerColor property is ignored). It is recommended to use RemoteCardDefaults.containerPainter to create the painter so that a scrim is drawn on top of the container image, ensuring that any content above the background is legible.
Example of a RemoteTitleCard with a background image painter:
Parameters
| onClick | Will be called when the user clicks the card |
| containerPainter | The RemotePainter to use to draw the container image of the RemoteTitleCard, such as returned by RemoteCardDefaults.containerPainter. |
| title | A slot for displaying the title of the card |
| modifier | Modifier to be applied to the card |
| time | An optional slot for displaying the time relevant to the contents of the card, or null to omit the time. |
| subtitle | An optional slot for displaying the subtitle of the card, or null to omit the subtitle. |
| enabled | Controls the enabled state of the card. When false, this component will not respond to user input |
| shape | Defines the card's shape. |
| colors | RemoteCardColors that will be used to resolve the colors used for this card. |
| border | A RemoteBorderStroke used for drawing the card's outline border, or null for no border. |
| contentPadding | The spacing values to apply internally between the container and the content |
| content | The optional body content of the card, or null to omit body content. |