Object

RemoteSwitchButtonDefaults

Contains the default values used by RemoteSwitchButton.

Source set: Android
public object RemoteSwitchButtonDefaults

Contains the default values used by RemoteSwitchButton.

Properties

Height

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

The default height of RemoteSwitchButton.

IconSpacing

Source set: Android
public val IconSpacing: RemoteDp = 6.rdp

The default spacing between an icon and label in RemoteSwitchButton.

IconSize

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

The recommended default size for icons when used inside RemoteSwitchButton.

LabelSpacerSize

Source set: Android
public val LabelSpacerSize: RemoteDp = 1.rdp

The default spacing between label and secondary label in RemoteSwitchButton.

ContentPadding

Source set: Android
public val ContentPadding: RemotePaddingValues =
        RemotePaddingValues(horizontal = 14.rdp, vertical = 8.rdp)

The default content padding used by RemoteSwitchButton.

switchButtonShape

Source set: Android
public val switchButtonShape: RemoteRoundedCornerShape = RemoteShapeDefaults.Large

The default shape for RemoteSwitchButton.

SwitchWidth

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

The width of the switch control track.

SwitchHeight

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

The total height of the switch control area.

SwitchInnerHeight

Source set: Android
public val SwitchInnerHeight: RemoteDp = 22.rdp

The height of the inner switch control track.

SwitchTrackWidth

Source set: Android
public val SwitchTrackWidth: RemoteDp = 2.rdp

The width of the switch track stroke/border.

ThumbRadiusUnchecked

Source set: Android
public val ThumbRadiusUnchecked: RemoteDp = 6.rdp

The radius of the thumb when unchecked.

ThumbRadiusChecked

Source set: Android
public val ThumbRadiusChecked: RemoteDp = 9.rdp

The radius of the thumb when checked.

Functions

switchButtonColors

Source set: Android
@Composable
    public fun switchButtonColors(): RemoteSwitchButtonColors

Creates a RemoteSwitchButtonColors with default values for RemoteSwitchButton.

Return

a RemoteSwitchButtonColors with the default colors for RemoteSwitchButton

switchButtonColors

Source set: Android
@Composable
    public fun switchButtonColors(
        checkedContainerColor: RemoteColor? = null,
        checkedContentColor: RemoteColor? = null,
        checkedSecondaryContentColor: RemoteColor? = null,
        checkedIconColor: RemoteColor? = null,
        checkedThumbColor: RemoteColor? = null,
        checkedThumbIconColor: RemoteColor? = null,
        checkedTrackColor: RemoteColor? = null,
        checkedTrackBorderColor: RemoteColor? = null,
        uncheckedContainerColor: RemoteColor? = null,
        uncheckedContentColor: RemoteColor? = null,
        uncheckedSecondaryContentColor: RemoteColor? = null,
        uncheckedIconColor: RemoteColor? = null,
        uncheckedThumbColor: RemoteColor? = null,
        uncheckedTrackColor: RemoteColor? = null,
        uncheckedTrackBorderColor: RemoteColor? = null,
        disabledCheckedContainerColor: RemoteColor? = null,
        disabledCheckedContentColor: RemoteColor? = null,
        disabledCheckedSecondaryContentColor: RemoteColor? = null,
        disabledCheckedIconColor: RemoteColor? = null,
        disabledCheckedThumbColor: RemoteColor? = null,
        disabledCheckedThumbIconColor: RemoteColor? = null,
        disabledCheckedTrackColor: RemoteColor? = null,
        disabledCheckedTrackBorderColor: RemoteColor? = null,
        disabledUncheckedContainerColor: RemoteColor? = null,
        disabledUncheckedContentColor: RemoteColor? = null,
        disabledUncheckedSecondaryContentColor: RemoteColor? = null,
        disabledUncheckedIconColor: RemoteColor? = null,
        disabledUncheckedThumbColor: RemoteColor? = null,
        disabledUncheckedTrackBorderColor: RemoteColor? = null,
    ): RemoteSwitchButtonColors

Creates a RemoteSwitchButtonColors with customized colors for RemoteSwitchButton.

Parameters

checkedContainerColor Container color when checked and enabled, or null to use the theme default.
checkedContentColor Content color when checked and enabled, or null to use the theme default.
checkedSecondaryContentColor Secondary content color when checked and enabled, or null to use the theme default.
checkedIconColor Icon color when checked and enabled, or null to use the theme default.
checkedThumbColor Thumb color when checked and enabled, or null to use the theme default.
checkedThumbIconColor Thumb icon color when checked and enabled, or null to use the theme default.
checkedTrackColor Track color when checked and enabled, or null to use the theme default.
checkedTrackBorderColor Track border color when checked and enabled, or null to use the theme default.
uncheckedContainerColor Container color when unchecked and enabled, or null to use the theme default.
uncheckedContentColor Content color when unchecked and enabled, or null to use the theme default.
uncheckedSecondaryContentColor Secondary content color when unchecked and enabled, or null to use the theme default.
uncheckedIconColor Icon color when unchecked and enabled, or null to use the theme default.
uncheckedThumbColor Thumb color when unchecked and enabled, or null to use the theme default.
uncheckedTrackColor Track color when unchecked and enabled, or null to use the theme default.
uncheckedTrackBorderColor Track border color when unchecked and enabled, or null to use the theme default.
disabledCheckedContainerColor Container color when checked and disabled, or null to use the theme default.
disabledCheckedContentColor Content color when checked and disabled, or null to use the theme default.
disabledCheckedSecondaryContentColor Secondary content color when checked and disabled, or null to use the theme default.
disabledCheckedIconColor Icon color when checked and disabled, or null to use the theme default.
disabledCheckedThumbColor Thumb color when checked and disabled, or null to use the theme default.
disabledCheckedThumbIconColor Thumb icon color when checked and disabled, or null to use the theme default.
disabledCheckedTrackColor Track color when checked and disabled, or null to use the theme default.
disabledCheckedTrackBorderColor Track border color when checked and disabled, or null to use the theme default.
disabledUncheckedContainerColor Container color when unchecked and disabled, or null to use the theme default.
disabledUncheckedContentColor Content color when unchecked and disabled, or null to use the theme default.
disabledUncheckedSecondaryContentColor Secondary content color when unchecked and disabled, or null to use the theme default.
disabledUncheckedIconColor Icon color when unchecked and disabled, or null to use the theme default.
disabledUncheckedThumbColor Thumb color when unchecked and disabled, or null to use the theme default.
disabledUncheckedTrackBorderColor Track border color when unchecked and disabled, or null to use the theme default.

Return

a RemoteSwitchButtonColors with the configured colors for RemoteSwitchButton

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: