{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

IconButtonDefaults

public static class IconButtonDefaults


Contains the default values used by all icon button types.

Summary

Public fields

static @NonNull IconButtonDefaults

Public methods

final @NonNull IconButtonColors
@Composable
filledIconButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor
)

Creates a IconButtonColors that represents the default colors used in a FilledIconButton.

final @NonNull IconToggleButtonColors
@Composable
filledIconToggleButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor,
    @NonNull Color checkedContainerColor,
    @NonNull Color checkedContentColor
)

Creates a IconToggleButtonColors that represents the default colors used in a FilledIconToggleButton.

final @NonNull IconButtonColors
@Composable
filledTonalIconButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor
)

Creates a IconButtonColors that represents the default colors used in a FilledTonalIconButton.

final @NonNull IconToggleButtonColors
@Composable
filledTonalIconToggleButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor,
    @NonNull Color checkedContainerColor,
    @NonNull Color checkedContentColor
)

Creates a IconToggleButtonColors that represents the default colors used in a FilledTonalIconToggleButton.

final @NonNull Shape

Default shape for a filled icon button.

final @NonNull Shape

Default shape for an outlined icon button.

final @NonNull IconButtonColors

Creates a IconButtonColors that represents the default colors used in a IconButton.

final @NonNull IconButtonColors
@Composable
iconButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor
)

Creates a IconButtonColors that represents the default colors used in a IconButton.

final @NonNull IconToggleButtonColors
@Composable
iconToggleButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor,
    @NonNull Color checkedContainerColor,
    @NonNull Color checkedContentColor
)

Creates a IconToggleButtonColors that represents the default colors used in a IconToggleButton.

final @NonNull BorderStroke

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled state.

final @NonNull IconButtonColors
@Composable
outlinedIconButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor
)

Creates a IconButtonColors that represents the default colors used in a OutlinedIconButton.

final BorderStroke
@Composable
outlinedIconToggleButtonBorder(boolean enabled, boolean checked)

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled and checked state.

final @NonNull IconToggleButtonColors
@Composable
outlinedIconToggleButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor,
    @NonNull Color checkedContainerColor,
    @NonNull Color checkedContentColor
)

Creates a IconToggleButtonColors that represents the default colors used in a OutlinedIconToggleButton.

Public fields

INSTANCE

public static @NonNull IconButtonDefaults INSTANCE

Public methods

filledIconButtonColors

@Composable
public final @NonNull IconButtonColors filledIconButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor
)

Creates a IconButtonColors that represents the default colors used in a FilledIconButton.

Parameters
@NonNull Color containerColor

the container color of this icon button when enabled.

@NonNull Color contentColor

the content color of this icon button when enabled.

@NonNull Color disabledContainerColor

the container color of this icon button when not enabled.

@NonNull Color disabledContentColor

the content color of this icon button when not enabled.

filledIconToggleButtonColors

@Composable
public final @NonNull IconToggleButtonColors filledIconToggleButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor,
    @NonNull Color checkedContainerColor,
    @NonNull Color checkedContentColor
)

Creates a IconToggleButtonColors that represents the default colors used in a FilledIconToggleButton.

Parameters
@NonNull Color containerColor

the container color of this icon button when enabled.

@NonNull Color contentColor

the content color of this icon button when enabled.

@NonNull Color disabledContainerColor

the container color of this icon button when not enabled.

@NonNull Color disabledContentColor

the content color of this icon button when not enabled.

@NonNull Color checkedContainerColor

the container color of this icon button when checked.

@NonNull Color checkedContentColor

the content color of this icon button when checked.

filledTonalIconButtonColors

@Composable
public final @NonNull IconButtonColors filledTonalIconButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor
)

Creates a IconButtonColors that represents the default colors used in a FilledTonalIconButton.

Parameters
@NonNull Color containerColor

the container color of this icon button when enabled.

@NonNull Color contentColor

the content color of this icon button when enabled.

@NonNull Color disabledContainerColor

the container color of this icon button when not enabled.

@NonNull Color disabledContentColor

the content color of this icon button when not enabled.

filledTonalIconToggleButtonColors

@Composable
public final @NonNull IconToggleButtonColors filledTonalIconToggleButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor,
    @NonNull Color checkedContainerColor,
    @NonNull Color checkedContentColor
)

Creates a IconToggleButtonColors that represents the default colors used in a FilledTonalIconToggleButton.

Parameters
@NonNull Color containerColor

the container color of this icon button when enabled.

@NonNull Color contentColor

the content color of this icon button when enabled.

@NonNull Color disabledContainerColor

the container color of this icon button when not enabled.

@NonNull Color disabledContentColor

the content color of this icon button when not enabled.

@NonNull Color checkedContainerColor

the container color of this icon button when checked.

@NonNull Color checkedContentColor

the content color of this icon button when checked.

getFilledShape

@Composable
public final @NonNull Shape getFilledShape()

Default shape for a filled icon button.

getOutlinedShape

@Composable
public final @NonNull Shape getOutlinedShape()

Default shape for an outlined icon button.

iconButtonColors

@Composable
public final @NonNull IconButtonColors iconButtonColors()

Creates a IconButtonColors that represents the default colors used in a IconButton.

iconButtonColors

@Composable
public final @NonNull IconButtonColors iconButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor
)

Creates a IconButtonColors that represents the default colors used in a IconButton.

Parameters
@NonNull Color containerColor

the container color of this icon button when enabled.

@NonNull Color contentColor

the content color of this icon button when enabled.

@NonNull Color disabledContainerColor

the container color of this icon button when not enabled.

@NonNull Color disabledContentColor

the content color of this icon button when not enabled.

iconToggleButtonColors

@Composable
public final @NonNull IconToggleButtonColors iconToggleButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor,
    @NonNull Color checkedContainerColor,
    @NonNull Color checkedContentColor
)

Creates a IconToggleButtonColors that represents the default colors used in a IconToggleButton.

Parameters
@NonNull Color containerColor

the container color of this icon button when enabled.

@NonNull Color contentColor

the content color of this icon button when enabled.

@NonNull Color disabledContainerColor

the container color of this icon button when not enabled.

@NonNull Color disabledContentColor

the content color of this icon button when not enabled.

@NonNull Color checkedContainerColor

the container color of this icon button when checked.

@NonNull Color checkedContentColor

the content color of this icon button when checked.

outlinedIconButtonBorder

@Composable
public final @NonNull BorderStroke outlinedIconButtonBorder(boolean enabled)

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled state.

Parameters
boolean enabled

whether the icon button is enabled

outlinedIconButtonColors

@Composable
public final @NonNull IconButtonColors outlinedIconButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor
)

Creates a IconButtonColors that represents the default colors used in a OutlinedIconButton.

Parameters
@NonNull Color containerColor

the container color of this icon button when enabled.

@NonNull Color contentColor

the content color of this icon button when enabled.

@NonNull Color disabledContainerColor

the container color of this icon button when not enabled.

@NonNull Color disabledContentColor

the content color of this icon button when not enabled.

outlinedIconToggleButtonBorder

@Composable
public final BorderStroke outlinedIconToggleButtonBorder(boolean enabled, boolean checked)

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled and checked state.

Parameters
boolean enabled

whether the icon button is enabled

boolean checked

whether the icon button is checked

outlinedIconToggleButtonColors

@Composable
public final @NonNull IconToggleButtonColors outlinedIconToggleButtonColors(
    @NonNull Color containerColor,
    @NonNull Color contentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledContentColor,
    @NonNull Color checkedContainerColor,
    @NonNull Color checkedContentColor
)

Creates a IconToggleButtonColors that represents the default colors used in a OutlinedIconToggleButton.

Parameters
@NonNull Color containerColor

the container color of this icon button when enabled.

@NonNull Color contentColor

the content color of this icon button when enabled.

@NonNull Color disabledContainerColor

the container color of this icon button when not enabled.

@NonNull Color disabledContentColor

the content color of this icon button when not enabled.

@NonNull Color checkedContainerColor

the container color of this icon button when checked.

@NonNull Color checkedContentColor

the content color of this icon button when checked.