public object RemoteCardDefaults
Contains the default values used by RemoteCard
Properties
OutlinedBorderSize
public val OutlinedBorderSize: RemoteDp = 1.rdp
The default size of the border for RemoteOutlinedCard
ContentPadding
public val ContentPadding: RemotePaddingValues = RemotePaddingValues(12.rdp)
The default content padding used by RemoteCard
ImageBottomPadding
public val ImageBottomPadding: RemoteDp = 12.rdp
Additional bottom padding added for TitleCard with an image background
CardWithContainerPainterContentPadding
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
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
public val AppImageSize: RemoteDp = 18.rdp
The default size of the app icon/image when used inside a RemoteAppCard.
shape
public val shape: RemoteShape
The default shape of RemoteCard, which determines its corner radius.
Height
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
public val Width: RemoteDp = 80.rdp
Functions
cardColors
@Composable
public fun cardColors(): RemoteCardColors
Creates a RemoteCardColors that represents the default container and content colors used in a RemoteCard, RemoteAppCard or RemoteTitleCard.
cardColors
@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
@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
@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
@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
@Composable
public fun scrimBrush(size: RemoteSize): RemoteBrush
Creates a RemoteBrush for the recommended scrim drawn on top of image container backgrounds.
cardWithContainerPainterColors
@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
@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. |