RemoteIconToggleButtonDefaults

object RemoteIconToggleButtonDefaults


Contains the default values used by RemoteIconToggleButton.

Summary

Public functions

RemoteIconToggleButtonShapes

Creates a RemoteIconToggleButtonShapes with a static shape that animates to pressedShape when pressed.

RemoteIconToggleButtonColors

Creates a RemoteIconToggleButtonColors for a RemoteIconToggleButton - by default, a primary container when checked and a tonal container when unchecked.

RemoteIconToggleButtonColors
@Composable
@RemoteComposable
colors(
    checkedContainerColor: RemoteColor?,
    checkedContentColor: RemoteColor?,
    uncheckedContainerColor: RemoteColor?,
    uncheckedContentColor: RemoteColor?,
    disabledCheckedContainerColor: RemoteColor?,
    disabledCheckedContentColor: RemoteColor?,
    disabledUncheckedContainerColor: RemoteColor?,
    disabledUncheckedContentColor: RemoteColor?
)

Creates a RemoteIconToggleButtonColors for a RemoteIconToggleButton - by default, a primary container when checked and a tonal container when unchecked.

RemoteDp
iconSizeFor(buttonSize: RemoteDp)

Recommended icon size for a given icon toggle button size.

RemoteIconToggleButtonShapes

Creates a RemoteIconToggleButtonShapes with a static shape that doesn't change between the checked and unchecked states.

RemoteIconToggleButtonShapes

Creates a RemoteIconToggleButtonShapes with a static shape that doesn't change between the checked and unchecked states.

RemoteIconToggleButtonShapes

Creates a RemoteIconToggleButtonShapes where the toggle button changes from uncheckedShape to checkedShape when checked, and animates to a shape with smaller corners when pressed.

RemoteIconToggleButtonShapes

Creates a RemoteIconToggleButtonShapes where the toggle button changes from uncheckedShape to checkedShape when checked.

Public properties

RemoteDp

The default size of an icon when used inside an icon toggle button of size Size.

RemoteDp

The size of an icon when used inside an icon toggle button with size ExtraLargeSize.

RemoteDp

The recommended size for an extra large RemoteIconToggleButton.

RemoteDp

The size of an icon when used inside an icon toggle button with size LargeSize.

RemoteDp

The recommended size for a large RemoteIconToggleButton.

RemoteDp

The default size applied for RemoteIconToggleButton.

RemoteDp

The recommended size of an icon when used inside an icon toggle button with size SmallSize.

RemoteDp

The recommended size for a small RemoteIconToggleButton.

RemoteCornerBasedShape

Recommended checked RemoteShape for RemoteIconToggleButton when using variantShapes or variantAnimatedShapes.

RemoteCornerBasedShape

Recommended pressed RemoteShape for RemoteIconToggleButton when using animatedShapes.

RemoteRoundedCornerShape

Recommended RemoteShape for RemoteIconToggleButton.

Public functions

animatedShapes

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun animatedShapes(
    shape: RemoteCornerBasedShape = this.shape,
    pressedShape: RemoteCornerBasedShape = this.pressedShape
): RemoteIconToggleButtonShapes

Creates a RemoteIconToggleButtonShapes with a static shape that animates to pressedShape 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.

Parameters
shape: RemoteCornerBasedShape = this.shape

The shape of the toggle button when not pressed.

pressedShape: RemoteCornerBasedShape = this.pressedShape

The shape of the toggle button when pressed.

Returns
RemoteIconToggleButtonShapes

a RemoteIconToggleButtonShapes with the configured resting and pressed shapes

colors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun colors(): RemoteIconToggleButtonColors

Creates a RemoteIconToggleButtonColors for a RemoteIconToggleButton - by default, a primary container when checked and a tonal container when unchecked.

colors

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun colors(
    checkedContainerColor: RemoteColor? = null,
    checkedContentColor: RemoteColor? = null,
    uncheckedContainerColor: RemoteColor? = null,
    uncheckedContentColor: RemoteColor? = null,
    disabledCheckedContainerColor: RemoteColor? = null,
    disabledCheckedContentColor: RemoteColor? = null,
    disabledUncheckedContainerColor: RemoteColor? = null,
    disabledUncheckedContentColor: RemoteColor? = null
): RemoteIconToggleButtonColors

Creates a RemoteIconToggleButtonColors for a RemoteIconToggleButton - by default, a primary container when checked and a tonal container when unchecked.

Parameters
checkedContainerColor: RemoteColor? = null

The container color of this toggle button when enabled and checked, or null to use the theme default.

checkedContentColor: RemoteColor? = null

The content color of this toggle button when enabled and checked, or null to use the theme default.

uncheckedContainerColor: RemoteColor? = null

The container color of this toggle button when enabled and unchecked, or null to use the theme default.

uncheckedContentColor: RemoteColor? = null

The content color of this toggle button when enabled and unchecked, or null to use the theme default.

disabledCheckedContainerColor: RemoteColor? = null

The container color of this toggle button when checked and not enabled, or null to use the theme default.

disabledCheckedContentColor: RemoteColor? = null

The content color of this toggle button when checked and not enabled, or null to use the theme default.

disabledUncheckedContainerColor: RemoteColor? = null

The container color of this toggle button when unchecked and not enabled, or null to use the theme default.

disabledUncheckedContentColor: RemoteColor? = null

The content color of this toggle button when unchecked and not enabled, or null to use the theme default.

iconSizeFor

Added in 1.0.0-alpha16
fun iconSizeFor(buttonSize: RemoteDp): RemoteDp

Recommended icon size for a given icon toggle button size.

Ensures that the minimum recommended icon size is applied.

Examples: for size LargeSize, returns LargeIconSize, for size ExtraLargeSize returns ExtraLargeIconSize.

Parameters
buttonSize: RemoteDp

The size of the icon toggle button

Returns
RemoteDp

the recommended icon size in RemoteDp for buttonSize

shapes

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun shapes(): RemoteIconToggleButtonShapes

Creates a RemoteIconToggleButtonShapes with a static shape that doesn't change between the checked and unchecked states.

shapes

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun shapes(shape: RemoteShape): RemoteIconToggleButtonShapes

Creates a RemoteIconToggleButtonShapes with a static shape that doesn't change between the checked and unchecked states.

Parameters
shape: RemoteShape

The shape of the toggle button.

variantAnimatedShapes

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun variantAnimatedShapes(
    uncheckedShape: RemoteCornerBasedShape = shape,
    checkedShape: RemoteCornerBasedShape = this.checkedShape
): RemoteIconToggleButtonShapes

Creates a RemoteIconToggleButtonShapes where the toggle button changes from uncheckedShape to checkedShape when checked, and animates to a shape with smaller corners when pressed.

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

Parameters
uncheckedShape: RemoteCornerBasedShape = shape

The shape of the toggle button when unchecked.

checkedShape: RemoteCornerBasedShape = this.checkedShape

The shape of the toggle button when checked.

Returns
RemoteIconToggleButtonShapes

a RemoteIconToggleButtonShapes with the configured unchecked, checked and pressed shapes

variantShapes

Added in 1.0.0-alpha16
@Composable
@RemoteComposable
fun variantShapes(
    uncheckedShape: RemoteCornerBasedShape = shape,
    checkedShape: RemoteCornerBasedShape = this.checkedShape
): RemoteIconToggleButtonShapes

Creates a RemoteIconToggleButtonShapes where the toggle button changes from uncheckedShape to checkedShape when checked.

The shape is selected at playback time when RemoteIconToggleButton's checked is not a constant, which requires both shapes to be RemoteRoundedCornerShapes.

Parameters
uncheckedShape: RemoteCornerBasedShape = shape

The shape of the toggle button when unchecked.

checkedShape: RemoteCornerBasedShape = this.checkedShape

The shape of the toggle button when checked.

Returns
RemoteIconToggleButtonShapes

a RemoteIconToggleButtonShapes with the configured unchecked and checked shapes

Public properties

DefaultIconSize

Added in 1.0.0-alpha16
val DefaultIconSize: RemoteDp

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

ExtraLargeIconSize

Added in 1.0.0-alpha16
val ExtraLargeIconSize: RemoteDp

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

ExtraLargeSize

Added in 1.0.0-alpha16
val ExtraLargeSize: RemoteDp

The recommended size for an extra large RemoteIconToggleButton.

LargeIconSize

Added in 1.0.0-alpha16
val LargeIconSize: RemoteDp

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

LargeSize

Added in 1.0.0-alpha16
val LargeSize: RemoteDp

The recommended size for a large RemoteIconToggleButton.

Size

Added in 1.0.0-alpha16
val Size: RemoteDp

The default size applied for RemoteIconToggleButton.

SmallIconSize

Added in 1.0.0-alpha16
val SmallIconSize: RemoteDp

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

SmallSize

Added in 1.0.0-alpha16
val SmallSize: RemoteDp

The recommended size for a small RemoteIconToggleButton.

pressedShape

val pressedShape: RemoteCornerBasedShape

Recommended pressed RemoteShape for RemoteIconToggleButton when using animatedShapes.