object RemoteCardDefaults


Contains the default values used by RemoteCard

Summary

Public functions

RemoteCardColors

Creates a RemoteCardColors that represents the default container and content colors used in a RemoteCard, RemoteAppCard or RemoteTitleCard.

RemoteCardColors
@Composable
@RemoteComposable
cardColors(
    containerColor: RemoteColor?,
    contentColor: RemoteColor?,
    appNameColor: RemoteColor?,
    timeColor: RemoteColor?,
    titleColor: RemoteColor?,
    subtitleColor: RemoteColor?
)

Creates a RemoteCardColors that represents the default container and content colors used in a RemoteCard, RemoteAppCard or RemoteTitleCard.

RemoteCardColors

Creates a RemoteCardColors that represents the default container and content colors used in a RemoteCard with image container painter.

RemoteCardColors
@Composable
@RemoteComposable
cardWithContainerPainterColors(
    contentColor: RemoteColor?,
    appNameColor: RemoteColor?,
    timeColor: RemoteColor?,
    titleColor: RemoteColor?,
    subtitleColor: RemoteColor?
)

Creates a RemoteCardColors that represents the default container and content colors used in a RemoteCard or RemoteTitleCard with Image set as a background.

RemotePainter
@Composable
@RemoteComposable
containerPainter(
    image: RemoteImageBitmap,
    scrim: RemoteBrush?,
    alpha: RemoteFloat,
    shape: RemoteShape,
    contentScale: ContentScale
)

Creates a RemotePainter for the background of a RemoteCard or RemoteTitleCard that displays an image with a scrim on top to make sure that any content above the background will be legible.

RemoteCardColors

Creates a RemoteCardColors that represents the default container and content colors used in an RemoteOutlinedCard, outlined RemoteAppCard or RemoteTitleCard.

RemoteCardColors
@Composable
@RemoteComposable
outlinedCardColors(
    contentColor: RemoteColor?,
    appNameColor: RemoteColor?,
    timeColor: RemoteColor?,
    titleColor: RemoteColor?,
    subtitleColor: RemoteColor?
)

Creates a RemoteCardColors that represents the default container and content colors used in an RemoteOutlinedCard, outlined RemoteAppCard or RemoteTitleCard.

RemoteBrush

Creates a RemoteBrush for the recommended scrim drawn on top of image container backgrounds.

Public properties

RemoteDp

The default size of the app icon/image when used inside a RemoteAppCard.

RemotePaddingValues

ContentPadding for use in cards that have an image background in order to show more of the image.

RemotePaddingValues

The default content padding used by RemoteCard

RemoteDp

The default height of RemoteCard, RemoteAppCard and RemoteTitleCard.

RemoteDp

Additional bottom padding added for TitleCard with an image background

RemoteDp

The default size of the border for RemoteOutlinedCard

RemoteDp
RemoteColor

Returns a scrim color that can be used to draw a scrim on top of an image to ensure that any text drawn over the image is legible.

RemoteShape

The default shape of RemoteCard, which determines its corner radius.

Public functions

cardColors

Added in 1.0.0-alpha12
@Composable
@RemoteComposable
fun cardColors(): RemoteCardColors

Creates a RemoteCardColors that represents the default container and content colors used in a RemoteCard, RemoteAppCard or RemoteTitleCard.

cardColors

Added in 1.0.0-alpha12
@Composable
@RemoteComposable
fun cardColors(
    containerColor: RemoteColor? = null,
    contentColor: RemoteColor? = null,
    appNameColor: RemoteColor? = null,
    timeColor: RemoteColor? = null,
    titleColor: RemoteColor? = null,
    subtitleColor: RemoteColor? = null
): RemoteCardColors

Creates a RemoteCardColors that represents the default container and content colors used in a RemoteCard, RemoteAppCard or RemoteTitleCard.

Parameters
containerColor: RemoteColor? = null

the container color of this RemoteCard.

contentColor: RemoteColor? = null

the content color of this RemoteCard.

appNameColor: RemoteColor? = null

the color used for appName, only applies to RemoteAppCard.

timeColor: RemoteColor? = null

the color used for time, applies to RemoteAppCard and RemoteTitleCard.

titleColor: RemoteColor? = null

the color used for title, applies to RemoteAppCard and RemoteTitleCard.

subtitleColor: RemoteColor? = null

the color used for subtitle, applies to RemoteTitleCard.

cardWithContainerPainterColors

Added in 1.0.0-alpha12
@Composable
@RemoteComposable
fun cardWithContainerPainterColors(): RemoteCardColors

Creates a RemoteCardColors that represents the default container and content colors used in a RemoteCard with image container painter.

cardWithContainerPainterColors

Added in 1.0.0-alpha12
@Composable
@RemoteComposable
fun cardWithContainerPainterColors(
    contentColor: RemoteColor? = null,
    appNameColor: RemoteColor? = null,
    timeColor: RemoteColor? = null,
    titleColor: RemoteColor? = null,
    subtitleColor: RemoteColor? = null
): RemoteCardColors

Creates a RemoteCardColors that represents the default container and content colors used in a RemoteCard or RemoteTitleCard with Image set as a background.

Parameters
contentColor: RemoteColor? = null

the content color of this RemoteCard.

appNameColor: RemoteColor? = null

the color used for appName, only applies to RemoteAppCard.

timeColor: RemoteColor? = null

the color used for time, applies to RemoteAppCard and RemoteTitleCard.

titleColor: RemoteColor? = null

the color used for title, applies to RemoteAppCard and RemoteTitleCard.

subtitleColor: RemoteColor? = null

the color used for subtitle, applies to RemoteTitleCard.

containerPainter

Added in 1.0.0-alpha12
@Composable
@RemoteComposable
fun containerPainter(
    image: RemoteImageBitmap,
    scrim: RemoteBrush? = scrimBrush(RemoteSize(image.width, image.height)),
    alpha: RemoteFloat = DefaultAlpha.rf,
    shape: RemoteShape = this.shape,
    contentScale: ContentScale = ContentScale.Crop
): RemotePainter

Creates a RemotePainter for the background of a RemoteCard or RemoteTitleCard that displays an image with a scrim on top to make sure that any content above the background will be legible.

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.

Parameters
image: RemoteImageBitmap

The RemoteImageBitmap to use to draw the container background of the RemoteCard or RemoteTitleCard

scrim: RemoteBrush? = scrimBrush(RemoteSize(image.width, image.height))

The RemoteBrush to use to paint a scrim over the container image to ensure that any text drawn over the image is legible

alpha: RemoteFloat = DefaultAlpha.rf

Opacity of the container image painter and scrim.

shape: RemoteShape = this.shape

Define the container shape.

contentScale: ContentScale = ContentScale.Crop

Strategy for scaling the painter if its size does not match the container.

outlinedCardColors

Added in 1.0.0-alpha12
@Composable
@RemoteComposable
fun outlinedCardColors(): RemoteCardColors

Creates a RemoteCardColors that represents the default container and content colors used in an RemoteOutlinedCard, outlined RemoteAppCard or RemoteTitleCard.

outlinedCardColors

Added in 1.0.0-alpha12
@Composable
@RemoteComposable
fun outlinedCardColors(
    contentColor: RemoteColor? = null,
    appNameColor: RemoteColor? = null,
    timeColor: RemoteColor? = null,
    titleColor: RemoteColor? = null,
    subtitleColor: RemoteColor? = null
): RemoteCardColors

Creates a RemoteCardColors that represents the default container and content colors used in an RemoteOutlinedCard, outlined RemoteAppCard or RemoteTitleCard.

Parameters
contentColor: RemoteColor? = null

the content color of this RemoteOutlinedCard.

appNameColor: RemoteColor? = null

the color used for appName, only applies to RemoteAppCard.

timeColor: RemoteColor? = null

the color used for time, applies to RemoteAppCard and RemoteTitleCard.

titleColor: RemoteColor? = null

the color used for title, applies to RemoteAppCard and RemoteTitleCard.

subtitleColor: RemoteColor? = null

the color used for subtitle, applies to RemoteTitleCard.

scrimBrush

Added in 1.0.0-alpha12
@Composable
@RemoteComposable
fun scrimBrush(size: RemoteSize): RemoteBrush

Creates a RemoteBrush for the recommended scrim drawn on top of image container backgrounds.

Public properties

AppImageSize

Added in 1.0.0-alpha12
val AppImageSizeRemoteDp

The default size of the app icon/image when used inside a RemoteAppCard.

CardWithContainerPainterContentPadding

Added in 1.0.0-alpha12
val CardWithContainerPainterContentPaddingRemotePaddingValues

ContentPadding for use in cards that have an image background in order to show more of the image.

ContentPadding

Added in 1.0.0-alpha12
val ContentPaddingRemotePaddingValues

The default content padding used by RemoteCard

Height

Added in 1.0.0-alpha12
val HeightRemoteDp

The default height of RemoteCard, RemoteAppCard and RemoteTitleCard. The card will increase its height to accommodate the contents, if necessary.

ImageBottomPadding

Added in 1.0.0-alpha12
val ImageBottomPaddingRemoteDp

Additional bottom padding added for TitleCard with an image background

OutlinedBorderSize

Added in 1.0.0-alpha12
val OutlinedBorderSizeRemoteDp

The default size of the border for RemoteOutlinedCard

Width

Added in 1.0.0-alpha12
val WidthRemoteDp

scrimColor

val scrimColorRemoteColor

Returns a scrim color that can be used to draw a scrim on top of an image to ensure that any text drawn over the image is legible.

shape

val shapeRemoteShape

The default shape of RemoteCard, which determines its corner radius.