Object

RemoteButtonDefaults

Contains the default values used by RemoteButton

Source set: Android
public object RemoteButtonDefaults

Contains the default values used by RemoteButton

Properties

shape

Source set: Android
public val shape: RemoteRoundedCornerShape = RemoteRoundedCornerShape(26.rdp)

Recommended RemoteRoundedCornerShape for RemoteButton.

compactButtonShape

Source set: Android
public val compactButtonShape: RemoteRoundedCornerShape = RemoteRoundedCornerShape(18.rdp)

Recommended RemoteRoundedCornerShape for RemoteCompactButton.

Height

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

The default minimum height applied for the RemoteButton.

Width

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

The default minimum width applied for the RemoteButton.

IconSpacing

Source set: Android
public val IconSpacing: RemoteDp = 6.rdp

The default size of the spacing between an icon and a text when they are used inside a RemoteButton.

CompactButtonIconSpacing

Source set: Android
public val CompactButtonIconSpacing: RemoteDp = 4.rdp

The default size of the spacing between an icon and a text when they are used inside a RemoteCompactButton.

ExtraSmallIconSize

Source set: Android
public val ExtraSmallIconSize: RemoteDp = 20.rdp

The recommended icon size when used in RemoteCompactButtons containing both icon and text.

SmallIconSize

Source set: Android
public val SmallIconSize: RemoteDp = 24.rdp

The recommended icon size when used in RemoteCompactButtons containing icon-only content.

IconSize

Source set: Android
public val IconSize: RemoteDp = 26.rdp

The recommended default size for icons when used inside a RemoteButton.

LargeIconSize

Source set: Android
public val LargeIconSize: RemoteDp = 32.rdp

The recommended icon size when used in RemoteButtons for icons such as an app icon

ButtonHorizontalPadding

Source set: Android
public val ButtonHorizontalPadding: RemoteDp = 14.rdp

The recommended horizontal padding used by RemoteButton by default

ButtonVerticalPadding

Source set: Android
public val ButtonVerticalPadding: RemoteDp = 6.rdp

The recommended vertical padding used by RemoteButton by default

ContentPadding

Source set: Android
public val ContentPadding: RemotePaddingValues =
        RemotePaddingValues(horizontal = ButtonHorizontalPadding, vertical = ButtonVerticalPadding)

The default content padding used by RemoteButton

CompactButtonHeight

Source set: Android
public val CompactButtonHeight: RemoteDp = 48.rdp

The height applied for the RemoteCompactButton. This includes a visible button height of 32.dp and 8.dp of padding above and below the button in order to meet accessibility guidelines that request a minimum of 48.dp height and width of tappable area.

Note that you can override it by adjusting Modifier.height and Modifier.padding directly on RemoteCompactButton.

CompactButtonContentPadding

Source set: Android
public val CompactButtonContentPadding: RemotePaddingValues =
        RemotePaddingValues(
            leftPadding = CompactButtonHorizontalPadding,
            topPadding = CompactButtonVerticalPadding,
            rightPadding = CompactButtonHorizontalPadding,
            bottomPadding = CompactButtonVerticalPadding,
        )

The default content padding used by RemoteCompactButton

DisabledContainerAlpha

Source set: Android
public val DisabledContainerAlpha: RemoteFloat = 0.12f.rf

The default alpha applied to the container when the button is disabled.

Functions

buttonColors

Source set: Android
@Composable
    public fun buttonColors(): RemoteButtonColors

Creates a RemoteButtonColors that represents the default background and content colors used in a RemoteButton.

Return

a RemoteButtonColors with the default colors for a filled RemoteButton

buttonColors

Source set: Android
@Composable
    public fun buttonColors(
        containerColor: RemoteColor? = null,
        contentColor: RemoteColor? = null,
        secondaryContentColor: RemoteColor? = null,
        iconColor: RemoteColor? = null,
        disabledContainerColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
        disabledSecondaryContentColor: RemoteColor? = null,
        disabledIconColor: RemoteColor? = null,
    ): RemoteButtonColors

Creates a RemoteButtonColors that represents the default background and content colors used in a RemoteButton.

Parameters

containerColor The background color of this RemoteButton when enabled, or null to use the theme default.
contentColor The content color of this RemoteButton when enabled, or null to use the theme default.
secondaryContentColor The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.
iconColor The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.
disabledContainerColor The background color of this RemoteButton when not enabled, or null to use the theme default.
disabledContentColor The content color of this RemoteButton when not enabled, or null to use the theme default.
disabledSecondaryContentColor The secondary content color of this RemoteButton when not enabled, or null to use the theme default.
disabledIconColor The icon color of this RemoteButton when not enabled, or null to use the theme default.

Return

a RemoteButtonColors with the configured colors for a filled RemoteButton

filledTonalButtonColors

Source set: Android
@Composable
    public fun filledTonalButtonColors(): RemoteButtonColors

Creates a RemoteButtonColors with a muted background and contrasting content color, the defaults for medium emphasis buttons.

Return

a RemoteButtonColors with the default colors for a filled tonal RemoteButton

filledTonalButtonColors

Source set: Android
@Composable
    public fun filledTonalButtonColors(
        containerColor: RemoteColor? = null,
        contentColor: RemoteColor? = null,
        secondaryContentColor: RemoteColor? = null,
        iconColor: RemoteColor? = null,
        disabledContainerColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
        disabledSecondaryContentColor: RemoteColor? = null,
        disabledIconColor: RemoteColor? = null,
    ): RemoteButtonColors

Creates a RemoteButtonColors with a muted background and contrasting content color, the defaults for medium emphasis buttons.

Parameters

containerColor The background color of this RemoteButton when enabled, or null to use the theme default.
contentColor The content color of this RemoteButton when enabled, or null to use the theme default.
secondaryContentColor The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.
iconColor The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.
disabledContainerColor The background color of this RemoteButton when not enabled, or null to use the theme default.
disabledContentColor The content color of this RemoteButton when not enabled, or null to use the theme default.
disabledSecondaryContentColor The secondary content color of this RemoteButton when not enabled, or null to use the theme default.
disabledIconColor The icon color of this RemoteButton when not enabled, or null to use the theme default.

Return

a RemoteButtonColors with the configured colors for a filled tonal RemoteButton

filledVariantButtonColors

Source set: Android
@Composable
    public fun filledVariantButtonColors(): RemoteButtonColors

Creates a RemoteButtonColors with higher chroma container colors.

Return

a RemoteButtonColors with the default colors for a filled variant RemoteButton

filledVariantButtonColors

Source set: Android
@Composable
    public fun filledVariantButtonColors(
        containerColor: RemoteColor? = null,
        contentColor: RemoteColor? = null,
        secondaryContentColor: RemoteColor? = null,
        iconColor: RemoteColor? = null,
        disabledContainerColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
        disabledSecondaryContentColor: RemoteColor? = null,
        disabledIconColor: RemoteColor? = null,
    ): RemoteButtonColors

Creates a RemoteButtonColors with higher chroma container colors.

Parameters

containerColor The background color of this RemoteButton when enabled, or null to use the theme default.
contentColor The content color of this RemoteButton when enabled, or null to use the theme default.
secondaryContentColor The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.
iconColor The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.
disabledContainerColor The background color of this RemoteButton when not enabled, or null to use the theme default.
disabledContentColor The content color of this RemoteButton when not enabled, or null to use the theme default.
disabledSecondaryContentColor The secondary content color of this RemoteButton when not enabled, or null to use the theme default.
disabledIconColor The icon color of this RemoteButton when not enabled, or null to use the theme default.

Return

a RemoteButtonColors with the configured colors for a filled variant RemoteButton

outlinedButtonColors

Source set: Android
@Composable
    public fun outlinedButtonColors(): RemoteButtonColors

Creates a RemoteButtonColors with a transparent background for outlined buttons.

Return

a RemoteButtonColors with the default colors for an outlined RemoteButton

outlinedButtonColors

Source set: Android
@Composable
    public fun outlinedButtonColors(
        contentColor: RemoteColor? = null,
        secondaryContentColor: RemoteColor? = null,
        iconColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
        disabledSecondaryContentColor: RemoteColor? = null,
        disabledIconColor: RemoteColor? = null,
    ): RemoteButtonColors

Creates a RemoteButtonColors with a transparent background for outlined buttons.

Parameters

contentColor The content color of this RemoteButton when enabled, or null to use the theme default.
secondaryContentColor The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.
iconColor The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.
disabledContentColor The content color of this RemoteButton when not enabled, or null to use the theme default.
disabledSecondaryContentColor The secondary content color of this RemoteButton when not enabled, or null to use the theme default.
disabledIconColor The icon color of this RemoteButton when not enabled, or null to use the theme default.

Return

a RemoteButtonColors with the configured colors for an outlined RemoteButton

childButtonColors

Source set: Android
@Composable
    public fun childButtonColors(): RemoteButtonColors

Creates a RemoteButtonColors with transparent background, the defaults for low emphasis buttons. Use childButtonColors for optional or supplementary actions with the least amount of prominence.

Return

a RemoteButtonColors with the default colors for a child RemoteButton

childButtonColors

Source set: Android
@Composable
    public fun childButtonColors(
        contentColor: RemoteColor? = null,
        secondaryContentColor: RemoteColor? = null,
        iconColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
        disabledSecondaryContentColor: RemoteColor? = null,
        disabledIconColor: RemoteColor? = null,
    ): RemoteButtonColors

Creates a RemoteButtonColors with transparent background, the defaults for low emphasis buttons. Use childButtonColors for optional or supplementary actions with the least amount of prominence.

Parameters

contentColor The content color of this RemoteButton when enabled, or null to use the theme default.
secondaryContentColor The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.
iconColor The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.
disabledContentColor The content color of this RemoteButton when not enabled, or null to use the theme default.
disabledSecondaryContentColor The secondary content color of this RemoteButton when not enabled, or null to use the theme default.
disabledIconColor The icon color of this RemoteButton when not enabled, or null to use the theme default.

Return

a RemoteButtonColors with the configured colors for a child RemoteButton

buttonWithContainerPainterColors

Source set: Android
@Composable
    public fun buttonWithContainerPainterColors(): RemoteButtonColors

Creates a RemoteButtonColors for the content in a RemoteButton with an image container painter.

Return

a RemoteButtonColors with the default colors for a RemoteButton with a container painter

buttonWithContainerPainterColors

Source set: Android
@Composable
    public fun buttonWithContainerPainterColors(
        contentColor: RemoteColor? = null,
        secondaryContentColor: RemoteColor? = null,
        iconColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
        disabledSecondaryContentColor: RemoteColor? = null,
        disabledIconColor: RemoteColor? = null,
    ): RemoteButtonColors

Creates a RemoteButtonColors for the content in a RemoteButton with an image container painter.

Parameters

contentColor The content color of this RemoteButton when enabled, or null to use the theme default.
secondaryContentColor The secondary content color of this RemoteButton when enabled, used for secondaryLabel content, or null to use the theme default.
iconColor The icon color of this RemoteButton when enabled, used for icon content, or null to use the theme default.
disabledContentColor The content color of this RemoteButton when not enabled, or null to use the theme default.
disabledSecondaryContentColor The secondary content color of this RemoteButton when not enabled, or null to use the theme default.
disabledIconColor The icon color of this RemoteButton when not enabled, or null to use the theme default.

Return

a RemoteButtonColors with the configured colors for a RemoteButton with a container painter

containerPainter

Source set: Android
@Composable
    public fun containerPainter(
        image: RemoteImageBitmap,
        scrim: RemoteBrush? = scrimBrush(),
        alpha: RemoteFloat = DefaultAlpha.rf,
        shape: RemoteShape = this.shape,
        contentScale: ContentScale = ContentScale.Crop,
    ): RemotePainter

Creates a RemotePainter for the background of a RemoteButton with container painter, 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 Button. Buttons 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 RemoteButton.
scrim The RemoteBrush to use to paint a scrim over the container image to ensure that any text drawn over the image is legible, or null if no scrim should be drawn over the image.
alpha Opacity of the container image painter and scrim, from 0.0 (completely transparent) to 1.0 (completely opaque).
shape Define the container shape.
contentScale the rule to apply to scale the image when its size does not match the layout

Return

a RemotePainter that draws image with the optional scrim for a RemoteButton

disabledContainerPainter

Source set: Android
@Composable
    public fun disabledContainerPainter(containerPainter: RemotePainter): RemotePainter

Creates a RemotePainter for the disabled background of a RemoteButton with container painter - draws the containerPainter with an alpha applied to achieve a disabled effect.

An Image background is a means to reinforce the meaning of information in a Button. Buttons should have a content color that contrasts with the background image and scrim.

Parameters

containerPainter The RemotePainter to use to draw the container background of the RemoteButton.

Return

a RemotePainter that draws containerPainter with disabled alpha applied

scrimBrush

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

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

Return

a RemoteBrush for drawing a scrim over an image container background

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.

Parameters

size The size of the scrim brush gradient.

Return

a RemoteBrush for drawing a scrim of the given size over an image container background

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: