TimePickerDefaults

object TimePickerDefaults


Contains the default values used by TimePicker

Summary

Public functions

TimePickerColors

Creates a TimePickerColors for a TimePicker.

TimePickerColors
@Composable
timePickerColors(
    selectedPickerContentColor: Color,
    unselectedPickerContentColor: Color,
    separatorColor: Color,
    pickerLabelColor: Color,
    confirmButtonContentColor: Color,
    confirmButtonContainerColor: Color
)

Creates a TimePickerColors for a TimePicker.

TimePickerSelection

The default TimePickerSelection for TimePicker is set to the first available time component based on the provided TimePickerType and current system time format.

Public properties

TimePickerType

The default TimePickerType for TimePicker aligns with the current system time format.

Public functions

timePickerColors

Added in 1.5.0
@Composable
fun timePickerColors(): TimePickerColors

Creates a TimePickerColors for a TimePicker.

timePickerColors

Added in 1.6.0-alpha03
@Composable
fun timePickerColors(
    selectedPickerContentColor: Color = Color.Unspecified,
    unselectedPickerContentColor: Color = Color.Unspecified,
    separatorColor: Color = Color.Unspecified,
    pickerLabelColor: Color = Color.Unspecified,
    confirmButtonContentColor: Color = Color.Unspecified,
    confirmButtonContainerColor: Color = Color.Unspecified
): TimePickerColors

Creates a TimePickerColors for a TimePicker.

Parameters
selectedPickerContentColor: Color = Color.Unspecified

The content color of selected picker.

unselectedPickerContentColor: Color = Color.Unspecified

The content color of unselected pickers.

separatorColor: Color = Color.Unspecified

The color of separator between the pickers.

pickerLabelColor: Color = Color.Unspecified

The color of the picker label.

confirmButtonContentColor: Color = Color.Unspecified

The content color of the confirm button.

confirmButtonContainerColor: Color = Color.Unspecified

The container color of the confirm button.

timePickerSelection

Added in 1.6.0-alpha03
@RequiresApi(value = 26)
@Composable
fun timePickerSelection(timePickerType: TimePickerType): TimePickerSelection

The default TimePickerSelection for TimePicker is set to the first available time component based on the provided TimePickerType and current system time format.

Public properties

timePickerType

val timePickerTypeTimePickerType

The default TimePickerType for TimePicker aligns with the current system time format.