public object RemoteIconToggleButtonDefaults
Contains the default values used by RemoteIconToggleButton.
Properties
shape
public val shape: RemoteRoundedCornerShape = RemoteCircleShape
Recommended RemoteShape for RemoteIconToggleButton.
checkedShape
public val checkedShape: RemoteCornerBasedShape
Recommended checked RemoteShape for RemoteIconToggleButton when using variantShapes or variantAnimatedShapes.
pressedShape
public val pressedShape: RemoteCornerBasedShape
Recommended pressed RemoteShape for RemoteIconToggleButton when using animatedShapes.
SmallIconSize
public val SmallIconSize: RemoteDp = 24.rdp
The recommended size of an icon when used inside an icon toggle button with size SmallSize. Use iconSizeFor to easily determine the icon size.
DefaultIconSize
public val DefaultIconSize: RemoteDp = 26.rdp
The default size of an icon when used inside an icon toggle button of size Size. Use iconSizeFor to easily determine the icon size.
LargeIconSize
public val LargeIconSize: RemoteDp = 32.rdp
The size of an icon when used inside an icon toggle button with size LargeSize. Use iconSizeFor to easily determine the icon size.
ExtraLargeIconSize
public val ExtraLargeIconSize: RemoteDp = 36.rdp
The size of an icon when used inside an icon toggle button with size ExtraLargeSize. Use iconSizeFor to easily determine the icon size.
SmallSize
public val SmallSize: RemoteDp = 48.rdp
The recommended size for a small RemoteIconToggleButton.
Size
public val Size: RemoteDp = 52.rdp
The default size applied for RemoteIconToggleButton.
LargeSize
public val LargeSize: RemoteDp = 60.rdp
The recommended size for a large RemoteIconToggleButton.
ExtraLargeSize
public val ExtraLargeSize: RemoteDp = 72.rdp
The recommended size for an extra large RemoteIconToggleButton.
Functions
iconSizeFor
public 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 | The size of the icon toggle button |
Return
the recommended icon size in RemoteDp for buttonSize
shapes
@Composable @RemoteComposable public fun shapes(): RemoteIconToggleButtonShapes
Creates a RemoteIconToggleButtonShapes with a static shape that doesn't change between the checked and unchecked states.
Return
a RemoteIconToggleButtonShapes with the default static shape
shapes
@Composable
public fun shapes(shape: RemoteShape): RemoteIconToggleButtonShapes
Creates a RemoteIconToggleButtonShapes with a static shape that doesn't change between the checked and unchecked states.
Parameters
| shape | The shape of the toggle button. |
Return
a RemoteIconToggleButtonShapes with the given static shape
variantShapes
@Composable
public 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 | The shape of the toggle button when unchecked. |
| checkedShape | The shape of the toggle button when checked. |
Return
a RemoteIconToggleButtonShapes with the configured unchecked and checked shapes
animatedShapes
@Composable
public 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 | The shape of the toggle button when not pressed. |
| pressedShape | The shape of the toggle button when pressed. |
Return
a RemoteIconToggleButtonShapes with the configured resting and pressed shapes
variantAnimatedShapes
@Composable
public 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 | The shape of the toggle button when unchecked. |
| checkedShape | The shape of the toggle button when checked. |
Return
a RemoteIconToggleButtonShapes with the configured unchecked, checked and pressed shapes
colors
@Composable
public fun colors(): RemoteIconToggleButtonColors
Creates a RemoteIconToggleButtonColors for a RemoteIconToggleButton - by default, a primary container when checked and a tonal container when unchecked.
Return
a RemoteIconToggleButtonColors with the default colors for RemoteIconToggleButton
colors
@Composable
public 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 | The container color of this toggle button when enabled and checked, or null to use the theme default. |
| checkedContentColor | The content color of this toggle button when enabled and checked, or null to use the theme default. |
| uncheckedContainerColor | The container color of this toggle button when enabled and unchecked, or null to use the theme default. |
| uncheckedContentColor | The content color of this toggle button when enabled and unchecked, or null to use the theme default. |
| disabledCheckedContainerColor | The container color of this toggle button when checked and not enabled, or null to use the theme default. |
| disabledCheckedContentColor | The content color of this toggle button when checked and not enabled, or null to use the theme default. |
| disabledUncheckedContainerColor | The container color of this toggle button when unchecked and not enabled, or null to use the theme default. |
| disabledUncheckedContentColor | The content color of this toggle button when unchecked and not enabled, or null to use the theme default. |
Return
a RemoteIconToggleButtonColors with the configured colors for RemoteIconToggleButton