Interface

SwitchColors

Represents the content colors used in Switch in different states.

Source set: Android
public interface SwitchColors

Represents the content colors used in Switch in different states.

Functions

thumbColor

Source set: Android
@Composable public fun thumbColor(enabled: Boolean, checked: Boolean): State<Color>

Represents the thumb color for this Switch, depending on the enabled and checked properties.

Parameters

enabled Whether the Switch is enabled
checked Whether the Switch is currently checked or unchecked

trackColor

Source set: Android
@Composable public fun trackColor(enabled: Boolean, checked: Boolean): State<Color>

Represents the track color for this Switch, depending on the enabled and checked properties.

Parameters

enabled Whether the Switch is enabled
checked Whether the Switch is currently checked or unchecked
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: