Object

RemoteTextToggleButtonDefaults

Contains the default values used by RemoteTextToggleButton.

Source set: Android
public object RemoteTextToggleButtonDefaults

Contains the default values used by RemoteTextToggleButton.

Properties

shape

Source set: Android
public val shape: RemoteRoundedCornerShape = RemoteCircleShape

Recommended RemoteShape for RemoteTextToggleButton.

checkedShape

Source set: Android
public val checkedShape: RemoteCornerBasedShape

Recommended checked RemoteShape for RemoteTextToggleButton when using variantShapes or variantAnimatedShapes.

pressedShape

Source set: Android
public val pressedShape: RemoteCornerBasedShape

Recommended pressed RemoteShape for RemoteTextToggleButton when using animatedShapes.

Size

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

The default size applied for RemoteTextToggleButton.

LargeSize

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

The recommended size for a large RemoteTextToggleButton.

ExtraLargeSize

Source set: Android
public val ExtraLargeSize: RemoteDp = 72.rdp

The recommended size for an extra large RemoteTextToggleButton.

textStyle

Source set: Android
public val textStyle: RemoteTextStyle

The default text style applied for RemoteTextToggleButton of size Size.

largeTextStyle

Source set: Android
public val largeTextStyle: RemoteTextStyle

The recommended text style for a RemoteTextToggleButton of size LargeSize.

extraLargeTextStyle

Source set: Android
public val extraLargeTextStyle: RemoteTextStyle

The recommended text style for a RemoteTextToggleButton of size ExtraLargeSize.

Functions

shapes

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

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

Return

a RemoteTextToggleButtonShapes with the default static shape

shapes

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

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

Parameters

shape The shape of the toggle button.

Return

a RemoteTextToggleButtonShapes with the given static shape

variantShapes

Source set: Android
@Composable
    public fun variantShapes(
        uncheckedShape: RemoteCornerBasedShape = shape,
        checkedShape: RemoteCornerBasedShape = this.checkedShape,
    ): RemoteTextToggleButtonShapes

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

The shape is selected at playback time when RemoteTextToggleButton'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 RemoteTextToggleButtonShapes with the configured unchecked and checked shapes

animatedShapes

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

Creates a RemoteTextToggleButtonShapes 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 RemoteTextToggleButtonShapes with the configured resting and pressed shapes

variantAnimatedShapes

Source set: Android
@Composable
    public fun variantAnimatedShapes(
        uncheckedShape: RemoteCornerBasedShape = shape,
        checkedShape: RemoteCornerBasedShape = this.checkedShape,
    ): RemoteTextToggleButtonShapes

Creates a RemoteTextToggleButtonShapes 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 RemoteTextToggleButtonShapes with the configured unchecked, checked and pressed shapes

colors

Source set: Android
@Composable
    public fun colors(): RemoteTextToggleButtonColors

Creates a RemoteTextToggleButtonColors for a RemoteTextToggleButton - by default, a primary container when checked and a tonal container when unchecked.

Return

a RemoteTextToggleButtonColors with the default colors for RemoteTextToggleButton

colors

Source set: Android
@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,
    ): RemoteTextToggleButtonColors

Creates a RemoteTextToggleButtonColors for a RemoteTextToggleButton - 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 RemoteTextToggleButtonColors with the configured colors for RemoteTextToggleButton

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: