Object

RemoteIconButtonDefaults

Contains the default values used by RemoteIconButton.

Source set: Android
public object RemoteIconButtonDefaults

Contains the default values used by RemoteIconButton.

Properties

shape

Source set: Android
public val shape: RemoteRoundedCornerShape = RemoteCircleShape

Recommended RemoteShape for RemoteIconButton.

pressedShape

Source set: Android
public val pressedShape: RemoteCornerBasedShape

Recommended pressed RemoteShape for RemoteIconButton.

DisabledImageOpacity

Source set: Android
public val DisabledImageOpacity: RemoteFloat = DisabledContentAlpha.rf

Recommended alpha to apply to a RemoteIconButton with Image content when disabled

SmallIconSize

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

The recommended size of an icon when used inside an icon button with size SmallButtonSize or ExtraSmallButtonSize. Use iconSizeFor to easily determine the icon size.

DefaultIconSize

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

The default size of an icon when used inside an icon button of size DefaultButtonSize. Use iconSizeFor to easily determine the icon size.

LargeIconSize

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

The size of an icon when used inside an icon button with size LargeButtonSize. Use iconSizeFor to easily determine the icon size.

SmallButtonSize

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

The recommended size for a small button.

DefaultButtonSize

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

The default size applied for buttons.

LargeButtonSize

Source set: Android
public val LargeButtonSize: RemoteDp = 60.rdp

The recommended size for a large button.

ExtraSmallButtonSize

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

The recommended background size of an extra small, compact button.

Functions

shapes

Source set: Android
@Composable @RemoteComposable public fun shapes(): RemoteIconButtonShapes

Returns the default RemoteIconButtonShapes for a static RemoteIconButton.

Return

a RemoteIconButtonShapes with the default static shape

shapes

Source set: Android
@Composable
    public fun shapes(shape: RemoteShape): RemoteIconButtonShapes

Returns a RemoteIconButtonShapes for a static RemoteIconButton.

Parameters

shape The normal shape of the RemoteIconButton.

Return

a RemoteIconButtonShapes with the given static shape

animatedShapes

Source set: Android
@Composable
    public fun animatedShapes(
        shape: RemoteCornerBasedShape = this.shape,
        pressedShape: RemoteCornerBasedShape = this.pressedShape,
    ): RemoteIconButtonShapes

Returns a RemoteIconButtonShapes with an animation between two RemoteCornerBasedShapes when pressed.

The press animation requires both shapes to be RemoteRoundedCornerShapes. It is driven by touch events on the player, and is not shown by players that don't dispatch them.

Example of an icon button animated when pressed:

Parameters

shape The normal shape of the RemoteIconButton.
pressedShape The pressed shape of the RemoteIconButton.

Return

a RemoteIconButtonShapes with the configured resting and pressed shapes

filledIconButtonColors

Source set: Android
@Composable
    public fun filledIconButtonColors(): RemoteIconButtonColors

Returns a RemoteIconButtonColors with the colors for a filled RemoteIconButton - by default, a colored background with a contrasting icon color.

Return

a RemoteIconButtonColors with the default colors for a filled RemoteIconButton

filledIconButtonColors

Source set: Android
@Composable
    public fun filledIconButtonColors(
        containerColor: RemoteColor? = null,
        contentColor: RemoteColor? = null,
        disabledContainerColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
    ): RemoteIconButtonColors

Returns a RemoteIconButtonColors with the colors for a filled RemoteIconButton - by default, a colored background with a contrasting icon color.

Parameters

containerColor The background color of this icon button when enabled, or null to use the theme default.
contentColor The color of this icon when enabled, or null to use the theme default.
disabledContainerColor The background color of this icon button when not enabled, or null to use the theme default.
disabledContentColor The color of this icon when not enabled, or null to use the theme default.

Return

a RemoteIconButtonColors with the configured colors for a filled RemoteIconButton

filledTonalIconButtonColors

Source set: Android
@Composable
    public fun filledTonalIconButtonColors(): RemoteIconButtonColors

Returns a RemoteIconButtonColors for a filled tonal RemoteIconButton with a muted background and contrasting content color.

Return

a RemoteIconButtonColors with the default colors for a filled tonal RemoteIconButton

filledTonalIconButtonColors

Source set: Android
@Composable
    public fun filledTonalIconButtonColors(
        containerColor: RemoteColor? = null,
        contentColor: RemoteColor? = null,
        disabledContainerColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
    ): RemoteIconButtonColors

Returns a RemoteIconButtonColors for a filled tonal RemoteIconButton with a muted background and contrasting content color.

Parameters

containerColor The background color of this icon button when enabled, or null to use the theme default.
contentColor The color of this icon when enabled, or null to use the theme default.
disabledContainerColor The background color of this icon button when not enabled, or null to use the theme default.
disabledContentColor The color of this icon when not enabled, or null to use the theme default.

Return

a RemoteIconButtonColors with the configured colors for a filled tonal RemoteIconButton

filledVariantIconButtonColors

Source set: Android
@Composable
    public fun filledVariantIconButtonColors(): RemoteIconButtonColors

Returns a RemoteIconButtonColors with higher chroma container colors for RemoteIconButton.

Return

a RemoteIconButtonColors with the default colors for a filled variant RemoteIconButton

filledVariantIconButtonColors

Source set: Android
@Composable
    public fun filledVariantIconButtonColors(
        containerColor: RemoteColor? = null,
        contentColor: RemoteColor? = null,
        disabledContainerColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
    ): RemoteIconButtonColors

Returns a RemoteIconButtonColors with higher chroma container colors for RemoteIconButton.

Parameters

containerColor The background color of this icon button when enabled, or null to use the theme default.
contentColor The color of this icon when enabled, or null to use the theme default.
disabledContainerColor The background color of this icon button when not enabled, or null to use the theme default.
disabledContentColor The color of this icon when not enabled, or null to use the theme default.

Return

a RemoteIconButtonColors with the configured colors for a filled variant RemoteIconButton

outlinedIconButtonColors

Source set: Android
@Composable
    public fun outlinedIconButtonColors(): RemoteIconButtonColors

Returns a RemoteIconButtonColors with a transparent background for outlined RemoteIconButton.

Return

a RemoteIconButtonColors with the default colors for an outlined RemoteIconButton

outlinedIconButtonColors

Source set: Android
@Composable
    public fun outlinedIconButtonColors(
        contentColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
    ): RemoteIconButtonColors

Returns a RemoteIconButtonColors with a transparent background for outlined RemoteIconButton.

Parameters

contentColor The color of this icon button when enabled, or null to use the theme default.
disabledContentColor The color of this icon when not enabled, or null to use the theme default.

Return

a RemoteIconButtonColors with the configured colors for an outlined RemoteIconButton

iconButtonColors

Source set: Android
@Composable
    public fun iconButtonColors(): RemoteIconButtonColors

Returns a RemoteIconButtonColors for an icon button - by default, a transparent background with contrasting content color. If the button is disabled then the colors default to RemoteColorScheme.onSurface with suitable alpha values applied.

Return

a RemoteIconButtonColors with the default colors for a RemoteIconButton

iconButtonColors

Source set: Android
@Composable
    public fun iconButtonColors(
        containerColor: RemoteColor? = null,
        contentColor: RemoteColor? = null,
        disabledContainerColor: RemoteColor? = null,
        disabledContentColor: RemoteColor? = null,
    ): RemoteIconButtonColors

Returns a RemoteIconButtonColors for an icon button - by default, a transparent background with contrasting content color. If the button is disabled then the colors default to RemoteColorScheme.onSurface with suitable alpha values applied.

Parameters

containerColor The background color of this icon button when enabled, or null to use the theme default.
contentColor The content color of this icon button when enabled, or null to use the theme default.
disabledContainerColor The background color of this icon button when not enabled, or null to use the theme default.
disabledContentColor The content color of this icon button when not enabled, or null to use the theme default.

Return

a RemoteIconButtonColors with the configured colors for a RemoteIconButton

iconSizeFor

Source set: Android
public fun iconSizeFor(buttonSize: RemoteDp): RemoteDp

Recommended icon size for a given icon button size.

Ensures that the minimum recommended icon size is applied.

Examples: for size LargeButtonSize, returns LargeIconSize, for size ExtraSmallButtonSize returns SmallIconSize.

Parameters

buttonSize The size of the icon button

Return

the recommended icon size in RemoteDp for buttonSize

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: