Start native apps faster with the Composables CLI ->
Object

TimePickerDefaults

Contains the default values used by TimePicker

Source set: Common
public object TimePickerDefaults

Contains the default values used by TimePicker

Functions

colors

Source set: Common
@Composable
    public fun colors(): TimePickerColors

Default colors used by a TimePicker in different states

colors

Source set: Common
@Composable
    public fun colors(
        clockDialColor: Color = Color.Unspecified,
        clockDialSelectedContentColor: Color = Color.Unspecified,
        clockDialUnselectedContentColor: Color = Color.Unspecified,
        selectorColor: Color = Color.Unspecified,
        containerColor: Color = Color.Unspecified,
        periodSelectorBorderColor: Color = Color.Unspecified,
        periodSelectorSelectedContainerColor: Color = Color.Unspecified,
        periodSelectorUnselectedContainerColor: Color = Color.Unspecified,
        periodSelectorSelectedContentColor: Color = Color.Unspecified,
        periodSelectorUnselectedContentColor: Color = Color.Unspecified,
        timeSelectorSelectedContainerColor: Color = Color.Unspecified,
        timeSelectorUnselectedContainerColor: Color = Color.Unspecified,
        timeSelectorSelectedContentColor: Color = Color.Unspecified,
        timeSelectorUnselectedContentColor: Color = Color.Unspecified,
    ): TimePickerColors

Default colors used by a TimePicker in different states

Parameters

clockDialColor The color of the clock dial.
clockDialSelectedContentColor the color of the numbers of the clock dial when they are selected or overlapping with the selector
clockDialUnselectedContentColor the color of the numbers of the clock dial when they are unselected
selectorColor The color of the clock dial selector.
containerColor The container color of the time picker.
periodSelectorBorderColor the color used for the border of the AM/PM toggle.
periodSelectorSelectedContainerColor the color used for the selected container of the AM/PM toggle
periodSelectorUnselectedContainerColor the color used for the unselected container of the AM/PM toggle
periodSelectorSelectedContentColor color used for the selected content of the AM/PM toggle
periodSelectorUnselectedContentColor color used for the unselected content of the AM/PM toggle
timeSelectorSelectedContainerColor color used for the selected container of the display buttons to switch between hour and minutes
timeSelectorUnselectedContainerColor color used for the unselected container of the display buttons to switch between hour and minutes
timeSelectorSelectedContentColor color used for the selected content of the display buttons to switch between hour and minutes
timeSelectorUnselectedContentColor color used for the unselected content of the display buttons to switch between hour and minutes

richColors

Source set: Common
@Composable
    public fun richColors(): TimePickerColors

Default colors used by a rich TimePicker in different states

richColors

Source set: Common
@Composable
    public fun richColors(
        clockDialColor: Color = Color.Unspecified,
        clockDialSelectedContentColor: Color = Color.Unspecified,
        clockDialUnselectedContentColor: Color = Color.Unspecified,
        selectorColor: Color = Color.Unspecified,
        containerColor: Color = Color.Unspecified,
        periodSelectorBorderColor: Color = Color.Unspecified,
        periodSelectorSelectedContainerColor: Color = Color.Unspecified,
        periodSelectorUnselectedContainerColor: Color = Color.Unspecified,
        periodSelectorSelectedContentColor: Color = Color.Unspecified,
        periodSelectorUnselectedContentColor: Color = Color.Unspecified,
        timeSelectorSelectedContainerColor: Color = Color.Unspecified,
        timeSelectorUnselectedContainerColor: Color = Color.Unspecified,
        timeSelectorSelectedContentColor: Color = Color.Unspecified,
        timeSelectorUnselectedContentColor: Color = Color.Unspecified,
    ): TimePickerColors

Default colors used by a rich TimePicker in different states

Parameters

clockDialColor The color of the clock dial.
clockDialSelectedContentColor the color of the numbers of the clock dial when they are selected or overlapping with the selector
clockDialUnselectedContentColor the color of the numbers of the clock dial when they are unselected
selectorColor The color of the clock dial selector.
containerColor The container color of the time picker.
periodSelectorBorderColor the color used for the border of the AM/PM toggle.
periodSelectorSelectedContainerColor the color used for the selected container of the AM/PM toggle
periodSelectorUnselectedContainerColor the color used for the unselected container of the AM/PM toggle
periodSelectorSelectedContentColor color used for the selected content of the AM/PM toggle
periodSelectorUnselectedContentColor color used for the unselected content of the AM/PM toggle
timeSelectorSelectedContainerColor color used for the selected container of the display buttons to switch between hour and minutes
timeSelectorUnselectedContainerColor color used for the unselected container of the display buttons to switch between hour and minutes
timeSelectorSelectedContentColor color used for the selected content of the display buttons to switch between hour and minutes
timeSelectorUnselectedContentColor color used for the unselected content of the display buttons to switch between hour and minutes

layoutType

Source set: Common
@Composable
    public fun layoutType(): TimePickerLayoutType

Default layout type, uses the screen dimensions to choose an appropriate layout.

shapes

Source set: Common
@Composable public fun shapes(): TimePickerShapes

Default shapes used by a TimePicker

shapes

Source set: Common
@Composable
    public fun shapes(
        timeFieldShape: Shape? = null,
        periodSelectorShape: Shape? = null,
    ): TimePickerShapes

Default shapes used by a TimePicker

Parameters

timeFieldShape the shape used for the time fields.
periodSelectorShape the shape used for the AM/PM toggle.