Object

RemoteCardDefaults

Contains the default values used by RemoteCard

Source set: Android
public object RemoteCardDefaults

Contains the default values used by RemoteCard

Properties

OutlinedBorderSize

Source set: Android
public val OutlinedBorderSize: RemoteDp = 1.rdp

The default size of the border for RemoteOutlinedCard

ContentPadding

Source set: Android
public val ContentPadding: RemotePaddingValues = RemotePaddingValues(12.rdp)

The default content padding used by RemoteCard

ImageBottomPadding

Source set: Android
public val ImageBottomPadding: RemoteDp = 12.rdp

Additional bottom padding added for TitleCard with an image background

CardWithContainerPainterContentPadding

Source set: Android
public val CardWithContainerPainterContentPadding: RemotePaddingValues =
        RemotePaddingValues(
            leftPadding = 12.rdp,
            topPadding = 12.rdp,
            rightPadding = 12.rdp,
            bottomPadding = 12.rdp + ImageBottomPadding,
        )

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

scrimColor

Source set: Android
public val scrimColor: 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.

AppImageSize

Source set: Android
public val AppImageSize: RemoteDp = 18.rdp

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

shape

Source set: Android
public val shape: RemoteShape

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

Height

Source set: Android
public val Height: RemoteDp = 64.rdp

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

Width

Source set: Android
public val Width: RemoteDp = 80.rdp

Functions

cardColors

Source set: Android
@Composable
    public fun cardColors(): RemoteCardColors

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

cardColors

Source set: Android
@Composable
    public 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 the container color of this RemoteCard.
contentColor the content color of this RemoteCard.
appNameColor the color used for appName, only applies to RemoteAppCard.
timeColor the color used for time, applies to RemoteAppCard and RemoteTitleCard.
titleColor the color used for title, applies to RemoteAppCard and RemoteTitleCard.
subtitleColor the color used for subtitle, applies to RemoteTitleCard.

outlinedCardColors

Source set: Android
@Composable
    public fun outlinedCardColors(): RemoteCardColors

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

outlinedCardColors

Source set: Android
@Composable
    public 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 the content color of this RemoteOutlinedCard.
appNameColor the color used for appName, only applies to RemoteAppCard.
timeColor the color used for time, applies to RemoteAppCard and RemoteTitleCard.
titleColor the color used for title, applies to RemoteAppCard and RemoteTitleCard.
subtitleColor the color used for subtitle, applies to RemoteTitleCard.

containerPainter

Source set: Android
@Composable
    public 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 The RemoteImageBitmap to use to draw the container background of the RemoteCard or RemoteTitleCard
scrim The RemoteBrush to use to paint a scrim over the container image to ensure that any text drawn over the image is legible
alpha Opacity of the container image painter and scrim.
shape Define the container shape.
contentScale Strategy for scaling the painter if its size does not match the container.

scrimBrush

Source set: Android
@Composable
    public fun scrimBrush(size: RemoteSize): RemoteBrush

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

cardWithContainerPainterColors

Source set: Android
@Composable
    public fun cardWithContainerPainterColors(): RemoteCardColors

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

cardWithContainerPainterColors

Source set: Android
@Composable
    public 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 the content color of this RemoteCard.
appNameColor the color used for appName, only applies to RemoteAppCard.
timeColor the color used for time, applies to RemoteAppCard and RemoteTitleCard.
titleColor the color used for title, applies to RemoteAppCard and RemoteTitleCard.
subtitleColor the color used for subtitle, applies to RemoteTitleCard.

Content updated: